/authorize allows invalid role
wehmoen opened this issue · 0 comments
Expected behavior
With https://steemconnect.com/authorize/@wehmoen/active
it is possible to add @wehmoen
as an active account auth to your account. As you see I specified active
in the url. Valid permissions are posting
, active
and owner
. Every other permission should not be allowed and a message should be shown indicating that an invalid role was specified.
Actual behavior
However, visiting https://steemconnect.com/authorize/@wehmoen/this-role-is-not-valid
does not show an error. After clicking the continue button the users is asked to enter his credentials. Then a loading animation is shown and nothing happens.
How to reproduce
- Open https://steemconnect.com/authorize/@wehmoen/this-role-is-not-valid in your browser
- Click continue
- Login in with your steem account
- You now see a loading screen and thats it. No error message.
- Browser/App version: Chrome, latest
- Operating system: Mac OS 10.14
How to fix
A possible fix for this would be to replace /src/components/Accounts/Authorize.js#L26
with:
role: ["posting","active","owner"].includes(props.params.role) ? props.params.role : 'posting',
Recording Of The Bug
A recording of this bug can be found in my google drive:
https://drive.google.com/file/d/18SlAvVII1kRSPDLR3Rr6CQqQs1ogKv9Y/view?usp=sharing