Skip to content

Commit 0316f81

Browse files
committed
remove 'tester' from the code. add tester clients as allowed clients in the init.sh script for the test suite instead.
1 parent 127deac commit 0316f81

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ php console.php app:enable solid
66
php console.php config:system:set trusted_domains 1 --value=server
77
php console.php config:system:set trusted_domains 2 --value=nextcloud.local
88
php console.php config:system:set trusted_domains 3 --value=thirdparty
9+
# set 'tester' and 'https://tester' as allowed clients for the test suite to run
10+
php console.php user:setting alice solid allowedClients '["f5d1278e8109edd94e1e4197e04873b9", "2e5cddcf0f663544e98982931e6cc5a6"]'
911
echo configured

solid/lib/Controller/ServerController.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,6 @@ public function authorize() {
255255

256256
private function checkApproval($clientId) {
257257
$allowedClients = $this->config->getAllowedClients($this->userId);
258-
if ($clientId == md5("tester")) { // FIXME: Double check that this is not a security issue; It is only here to help the test suite;
259-
return \Pdsinterop\Solid\Auth\Enum\Authorization::APPROVED;
260-
}
261-
if ($clientId == md5("https://tester")) { // FIXME: Double check that this is not a security issue; It is only here to help the test suite;
262-
return \Pdsinterop\Solid\Auth\Enum\Authorization::APPROVED;
263-
}
264258
if (in_array($clientId, $allowedClients)) {
265259
return \Pdsinterop\Solid\Auth\Enum\Authorization::APPROVED;
266260
} else {

0 commit comments

Comments
 (0)