File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,8 @@ value and then a User object is created::
7070 $username = $userProvider->getUsernameForApiKey($apiKey);
7171
7272 if (!$username) {
73- // this message will be returned to the client
73+ // CAUTION: this message will be returned to the client
74+ // (so don't put any un-trusted messages / error strings here)
7475 throw new CustomUserMessageAuthenticationException(
7576 sprintf('API Key "%s" does not exist.', $apiKey)
7677 );
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ the user::
4747 try {
4848 $user = $userProvider->loadUserByUsername($token->getUsername());
4949 } catch (UsernameNotFoundException $e) {
50- // error will be shown to the client
50+ // CAUTION: this message will be returned to the client
51+ // (so don't put any un-trusted messages / error strings here)
5152 throw new CustomUserMessageAuthenticationException('Invalid username or password');
5253 }
5354
@@ -56,7 +57,8 @@ the user::
5657 if ($passwordValid) {
5758 $currentHour = date('G');
5859 if ($currentHour < 14 || $currentHour > 16) {
59- // error will be shown to the client
60+ // CAUTION: this message will be returned to the client
61+ // (so don't put any un-trusted messages / error strings here)
6062 throw new CustomUserMessageAuthenticationException(
6163 'You can only log in between 2 and 4!',
6264 100
@@ -71,7 +73,8 @@ the user::
7173 );
7274 }
7375
74- // error will be shown to the client
76+ // CAUTION: this message will be returned to the client
77+ // (so don't put any un-trusted messages / error strings here)
7578 throw new CustomUserMessageAuthenticationException('Invalid username or password');
7679 }
7780
You can’t perform that action at this time.
0 commit comments