Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/workflows/test-file-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
outputs:
matrix: '[
{ tag: "${{ steps.etherpad-version-cleaned.outputs.version }}", expected: "${{ steps.etherpad-version-cleaned.outputs.version }}" },
{ tag: "2.3.2", expected: "2.3.2" },
{ tag: "2.3.0", expected: "2.3.0" },
{ tag: "2.2.7", expected: "2.2.7" },
{ tag: "2.2.2", expected: "2.2.2" },
Expand Down Expand Up @@ -68,5 +69,8 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Wait for etherpad service to be ready
run: timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9001)" != "200" ]]; do sleep 5; done' || false

- name: Scan etherpad instance for file hashes
run: bin/console.php ether:check-file-hashes http://localhost:9001 ${{ matrix.versions.expected }}
1 change: 1 addition & 0 deletions src/Console/CheckFileHashesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private function getFileHash(string $url, string $path): ?string
$client = new Client([
'base_uri' => $url,
'timeout' => 5.0,
'verify' => false,
]);
$response = $client->get($path, [
'headers' => ['Accept-Encoding' => 'gzip'],
Expand Down
1 change: 1 addition & 0 deletions src/Console/GenerateFileHashesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ private function getFileHash(string $url, string $path): ?string
$client = new Client([
'base_uri' => $url,
'timeout' => 5.0,
'verify' => false,
]);
$response = $client->get($path, [
'headers' => ['Accept-Encoding' => 'gzip'],
Expand Down
4 changes: 2 additions & 2 deletions src/Service/FileHashLookupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class FileHashLookupService
'24478719e9641726d55b26e97466708b' => ['2.1.1', null],
],
'static/js/attributes.js' => [
null => [null, '1.8.18'],
'3b78aa8c55200e09fe709178721c0e30' => ['1.9.0', '2.1.0'],
'9dbc0d1414a1f4696d66c5b89c3e9abc' => ['2.1.1', null],
],
Expand Down Expand Up @@ -78,7 +77,8 @@ class FileHashLookupService
'169c79ec1a44c5c45dfce64c0f62c7ef' => [null, '1.9.7'],
'2a37d1ffbd906c905fe7f1b42564caa5' => ['2.0.0', '2.1.0'],
'8fab111c95434eac9414f0d8ea5d81b8' => ['2.1.1', '2.1.1'],
'8ae26862f7716d1bada457fdc92bb1d1' => ['2.2.2', null],
'8ae26862f7716d1bada457fdc92bb1d1' => ['2.2.2', '2.3.2'],
'12ba3a5933f399b882cf847d407c31f0' => ['2.4.1', null],
],
];

Expand Down