Skip to content

Commit

Permalink
Testing & refactoring in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
rotexdegba committed Dec 8, 2023
1 parent 8cb3d99 commit c7de18f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ public function actionLogin() {
if( ($error_msg === '') ) {

$credentials = [
'username'=> filter_var($username, FILTER_SANITIZE_STRING),
'username'=> filter_var($username, FILTER_UNSAFE_RAW),
'password'=> $password, //Not sanitizing this. Sanitizing or
//validating passwords should be app
//specific & done during user creation.
Expand Down
3 changes: 3 additions & 0 deletions tests/BaseControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,9 @@ public function testThat_doLogin_WorksAsExpected() {
$psr11Container, 'da-controller', 'da-action', $req, $resp
);

////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////

$success_redirect_path = '/random-path';
$expected_redirect_path =
$_SESSION[\SMVCTools\Tests\TestObjects\ControllerWithPublicDoLogin::SESSN_PARAM_LOGIN_REDIRECT];
Expand Down

0 comments on commit c7de18f

Please sign in to comment.