Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Test PR #21

Open
wants to merge 75 commits into
base: 5.1-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
f765340
Set up tuf_updates mysql queries
fancyFranci Mar 20, 2022
fd82ae8
Fix table structure for TUF metadatas
bembelimen Mar 20, 2022
f43a95e
Change ordering of timestamp
bembelimen Mar 20, 2022
68ec0b1
Add allow null
bembelimen Mar 20, 2022
37d2341
Fix null values
bembelimen Mar 20, 2022
5909617
Merge pull request #2 from bembelimen/tuf/db-structure
fancyFranci Mar 20, 2022
351bb65
Add TUF databaseStorage
fancyFranci Mar 20, 2022
8e5bffb
Merge branch 'tuf-client' of github.com:fancyFranci/joomla-cms into t…
fancyFranci Mar 20, 2022
e69ec81
Create tuf table
fancyFranci Mar 20, 2022
7571ead
Add TUF exceptions
fancyFranci Mar 20, 2022
702d212
Implement all ArrayAccess methods
bembelimen Mar 20, 2022
69055f3
Merge pull request #3 from bembelimen/tuf/databasestorage
fancyFranci Mar 20, 2022
e83a573
Set TUF exception
fancyFranci Mar 20, 2022
798bc72
implement basic version of the tuf validator
Mar 23, 2022
0a3f0b4
remove php-tuf library
Mar 23, 2022
b06ed49
What zero-24 says
fancyFranci Jun 10, 2022
5b8e736
Merge branch '4.2-dev' into tuf-client
fancyFranci Jun 10, 2022
130e62d
Merge branch '4.2-dev' into validator
Jun 10, 2022
9b62a03
Merge remote-tracking branch 'magnus-tuf/validator' into tuf-client
fancyFranci Jun 10, 2022
133eacd
Merge pull request #3 from fancyFranci/tuf-client
bembelimen Jun 10, 2022
f81e015
Update drone hash
bembelimen Jun 10, 2022
7934f52
Add symfony/validator into composer.lock
bembelimen Jun 10, 2022
7fd25c8
Codestyle fixes
bembelimen Jun 10, 2022
dd22ede
Fix code style
bembelimen Jun 10, 2022
93fcbfb
wip tuf
nielsnuebel Jun 11, 2022
effde12
Change GuzzleFilteFetcher to HttpFileFetcher
nielsnuebel Jun 11, 2022
3b057a8
add missing semicolon
nielsnuebel Jun 11, 2022
1da619b
initial wip
zero-24 Jun 11, 2022
f6ac9c5
doc block updates
zero-24 Jun 11, 2022
5585d32
wip php minimum & stability
zero-24 Jun 11, 2022
f35a4a9
wip stability validation
zero-24 Jun 11, 2022
59eb40c
property_exists and variable names
zero-24 Jun 11, 2022
ee8d1e9
added tests and tweaks
SniperSister Jun 11, 2022
36010be
Merge pull request #9 from joomla-projects/snipersister/ConstraintsCh…
zero-24 Jun 11, 2022
9965451
wip
nielsnuebel Jun 11, 2022
caecbf3
Merge pull request #8 from joomla-projects/ConstraintsCHecker
nielsnuebel Jun 12, 2022
6086b2d
throw exception in installer update model when update site is tuf
Jun 12, 2022
d1f622b
Enqueue message instead of throwing an exception
Jun 12, 2022
88a99f7
move jhttp file fetcher into CMS library, update TUF client fork branch
SniperSister Jun 12, 2022
2442045
change stabilityTags to stability
nielsnuebel Jun 12, 2022
0bed04f
wip tuf
nielsnuebel Jun 12, 2022
393f7ed
cs fixes, tweaks
SniperSister Jun 12, 2022
3c20851
Apply suggestions from code review
SniperSister Jun 12, 2022
9805efa
cs fixes
SniperSister Jun 12, 2022
a4e1e21
Update composer.json
SniperSister Jun 12, 2022
311051b
Update composer.json
SniperSister Jun 12, 2022
c594935
Update tests/Unit/Libraries/Cms/TUF/HttpFileFetcherTest.php
SniperSister Jun 12, 2022
b749a32
Update tests/Unit/Libraries/Cms/TUF/HttpFileFetcherTest.php
SniperSister Jun 12, 2022
3e65cc2
Apply suggestions from code review
SniperSister Jun 12, 2022
b0c0097
cs fixes
SniperSister Jun 12, 2022
b416c8a
Merge branch 'snipersister/tuf-http-client' of github.com:joomla-proj…
SniperSister Jun 12, 2022
48f0b34
cs fixes
SniperSister Jun 12, 2022
b664303
Merge pull request #11 from joomla-projects/snipersister/tuf-http-client
SniperSister Jun 12, 2022
cd1eb5f
fix baseuri usage
SniperSister Jun 12, 2022
b4f00c0
Merge remote-tracking branch 'upstream/tuf' into validator
nielsnuebel Jun 12, 2022
271c544
remove unused import
Jun 12, 2022
b28fc93
implement HttpFileFetcher
nielsnuebel Jun 12, 2022
ff330d3
Update TufAdapter.php
zero-24 Jun 12, 2022
a4d8b47
remove typehint for paramater to support php 7.2.5
nielsnuebel Jun 12, 2022
dc9bcc7
Merge branch 'nielsnuebel/tuf' of github.com:joomla-projects/joomla-t…
nielsnuebel Jun 12, 2022
258a290
Update ConstraintCheckerTest.php
zero-24 Jun 12, 2022
cf6c1a3
remove whitespace
nielsnuebel Jun 12, 2022
8941c23
Merge branch 'nielsnuebel/tuf' of github.com:joomla-projects/joomla-t…
nielsnuebel Jun 12, 2022
c5c8f42
Update ConstraintChecker.php
zero-24 Jun 12, 2022
5f175af
Apply suggestions from code review
nielsnuebel Jun 12, 2022
4ba32cc
Merge pull request #10 from MagnusSinger/um-change
fancyFranci Sep 17, 2022
b930db6
Merge branch 'tuf' into nielsnuebel/tuf
fancyFranci Sep 17, 2022
3b4f8dc
Merge pull request #12 from joomla-projects/nielsnuebel/tuf
fancyFranci Sep 17, 2022
52b59d3
TufValidation add quoteName on delete query (#13)
Sep 17, 2022
d6bb842
Convert to PSR12 code style (#15)
fancyFranci Sep 17, 2022
16108c1
Add error messages (#14)
fancyFranci Sep 17, 2022
4def416
Merge branch '4.2-dev' of https://github.com/joomla-projects/joomla-t…
fancyFranci Sep 17, 2022
e1cfeb4
Continue integration of TUF into Joomla (#16)
Sep 18, 2022
b670c7f
Merge remote-tracking branch 'Joomla/5.1-dev' into 5.1/tuf
bembelimen Dec 8, 2023
97ce6b3
Add CMSObject replacement
bembelimen Dec 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--
-- Table structure for table `#__tuf_metadata`
--

CREATE TABLE IF NOT EXISTS `#__tuf_metadata` (
`id` int NOT NULL AUTO_INCREMENT,
`extension_id` int DEFAULT 0,
`root_json` text DEFAULT NULL,
`target_json` text DEFAULT NULL,
`snapshot_json` text DEFAULT NULL,
`timestamp_json` text DEFAULT NULL,
`mirrors_json` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates';

-- --------------------------------------------------------
INSERT INTO `#__tuf_metadata` (`extension_id`, `root_json`)
SELECT `extension_id`, '{"keytype": "ed25519", "scheme": "ed25519", "keyid": "02c3130c26fb3fe13fda279d578f3bc251f2ca3a42e5878de063e0ee345533c9", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "f813a2882b305389cac36a9b8ebee7576ba7a7de671d2617074b03c12fb003aa", "private": "b7cb4fab28bae035a6fc5d46736e6f2d10ea4ef943e6aace8c637c1fd141ac72"}}' FROM `#__extensions` WHERE `type`='file' AND `element`='joomla';
19 changes: 18 additions & 1 deletion administrator/components/com_installer/src/Model/UpdateModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Updater\Update;
use Joomla\CMS\Updater\Updater;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
Expand Down Expand Up @@ -336,7 +337,23 @@ public function update($uids, $minimumStability = Updater::STABILITY_STABLE)
continue;
}

$update->loadFromXml($instance->detailsurl, $minimumStability);
$app = Factory::getApplication();
$db = Factory::getContainer()->get(DatabaseDriver::class);
$query = $db->getQuery(true)
->select('type')
->from('#__update_sites')
->where($db->quoteName('id') . ' = :id')
->bind(':id', $instance->update_site_id, ParameterType::INTEGER);
$db->setQuery($query);
$updateSiteType = (string) $db->loadObject();

if ($updateSiteType == 'tuf') {
$app->enqueueMessage(Text::_('JLIB_INSTALLER_TUF_NOT_AVAILABLE'), 'error');

return;
} else {
$update->loadFromXml($instance->detailsurl, $minimumStability);
}

// Find and use extra_query from update_site if available
$updateSiteInstance = new \Joomla\CMS\Table\UpdateSite($this->getDatabase());
Expand Down
Loading