Skip to content

Commit

Permalink
fix status test
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 20, 2024
1 parent a2159a9 commit 3bdc9d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ default:
# - '%paths.base%//features//Sp3Idp1Sp1Idp1Sp2Idp2.feature'
# - '%paths.base%//features//WwwMetadataCept.feature'
# - '%paths.base%//features//ZSp1Idp1BetaSp1Idp3.feature'
# status_features:
# paths: [ '%paths.base%//features//status.feature' ]
# contexts: [ 'StatusContext' ]
status_features:
paths: [ '%paths.base%//features//status.feature' ]
contexts: [ 'StatusContext' ]
2 changes: 1 addition & 1 deletion features/bootstrap/StatusContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function iRequestTheInitialLoginPageOfThisModule()
'cookies' => true,
'http_errors' => false,
]);
$response = $client->get('http://ssp-idp1.local/module.php/core/authenticate.php?as=silauth');
$response = $client->get('http://ssp-idp1.local/module.php/admin/test/silauth');
$this->responseCode = $response->getStatusCode();
}

Expand Down
5 changes: 4 additions & 1 deletion modules/silauth/src/Auth/Source/system/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function isDatabaseOkay(): bool
FailedLoginIpAddress::getMostRecentFailedLoginFor('');
return true;
} catch (Throwable $t) {
$this->logError($t->getMessage());
$this->logError('isDatabaseOkay database check returned error: ' . $t->getMessage());
return false;
}
}
Expand All @@ -47,6 +47,9 @@ protected function isRequiredConfigPresent(): bool
*/
$baseURL = $globalConfig->getString('baseurlpath', '');
$avoidsSecurityHole = (preg_match('#^https?://.*/$#D', $baseURL) === 1);
if (!$avoidsSecurityHole) {
$this->logError('isRequiredConfigPresent failed: baseurlpath (' . $baseURL . ') does not meet requirements');
}
return $avoidsSecurityHole;
}

Expand Down

0 comments on commit 3bdc9d4

Please sign in to comment.