]> cat aescling's git repositories - mastodon.git/commit
fix(streaming): req.scopes can be nullable (#16823)
authorSasha Sorokin <10401817+Brawaru@users.noreply.github.com>
Wed, 13 Oct 2021 03:02:55 +0000 (10:02 +0700)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 03:02:55 +0000 (05:02 +0200)
commit6c88ebfd4b8e7d3d976cf3fd66c496394f845e87
treea9c04d3bceb616108973b2bdc3ead566aebf7bb5
parent89b5071fde2f111eaa53ce404712423de25a593d
fix(streaming): req.scopes can be nullable (#16823)

When checking for required OAuth scopes, an unexpected error could
happen due to missing (null-y) req.scopes. This commit fixes that by
checking if req.scopes are present before checking if any required
scopes are present, otherwise it skips that straight to rejection.
streaming/index.js