Skip to content

Commit 8d696fb

Browse files
committed
When checking user access, return false if the userName is empty.
1 parent e2c33ba commit 8d696fb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/authorizeRequest/checkUserAccess.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ function checkUserAccess(rules, headers) {
99
// Get the userName as the unscoped eppn ( e.g. the email without the @domain).
1010
const userName = eppn.split('@')[0];
1111

12+
// If we got an empty userName, fail to restrict the request.
13+
if (userName.trim() === '') {
14+
return false;
15+
}
16+
1217
// Unpack the rules, with defaults.
1318
const {
1419
users = [], states: affiliations = [], entitlements = [], admins = [],

0 commit comments

Comments
 (0)