Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes sending SMS messages to unknown phonenumbers #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mapidentity
Copy link
Contributor

This fixes an issue where the provider will send codes to any phonenumber given in the login screen. This is a potential abuse issue, since strangers should not receive (costly) messages. One exception is when allowing registration of new users.

Closes #47 (i think)

@cooperlyt
Copy link
Owner

Do you test this code in 'Authentication Everybody By Phone' Action ?

@mapidentity
Copy link
Contributor Author

Do you test this code in 'Authentication Everybody By Phone' Action ?

I don't think this currently works with this provider. For example;

curl 'keycloak/realms/app/sms/authentication-code?phoneNumber=%2B5534990001234'

results in {"expires_in":60} but actually does not send a code. I believe this is because we can't distinguish between AUTH requests between these two providers / flows. A solution could be putting this behind an option (for example, --spi-phone-allow-sending-unknown or something like that). Better suggestions are very much welcome.

I've tested it with the registration flow, that does work.

@mapidentity
Copy link
Contributor Author

@cooperlyt I'd like to move this forward to an acceptable pull request. Can you offer your thoughts on this matter?

@mapidentity mapidentity force-pushed the bugfix/block-unknown-phonenumbers branch from 05a50df to bcd2fb4 Compare July 23, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When I log in with an unregistered mobile number, The Provider still sends SMS to this phone number
2 participants