We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Recently I was reviewing some code that contained an SQL injection vulnerability which I believe to originate from the use of alphabetical_paginate .
the code they used looked like @users, @sorting_params = @users.alpha_paginate( params[:startletter], ALPHABETICAL_PAGINATE_CONFIG, &:name )
The injection was happening via http://somesite.com/users?startletter=G
By passing G' or 1='1 as the value of startletter it was possible to return all objects.
I think the fix should be to only take the first character, rather than the full string.
Feel free to contact me if you require further information.
Kind Regards Mike
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Recently I was reviewing some code that contained an SQL injection vulnerability which I believe to originate from the use of alphabetical_paginate .
the code they used looked like
@users, @sorting_params = @users.alpha_paginate(
params[:startletter],
ALPHABETICAL_PAGINATE_CONFIG,
&:name
)
The injection was happening via
http://somesite.com/users?startletter=G
By passing
G' or 1='1
as the value of startletter it was possible to return all objects.
I think the fix should be to only take the first character, rather than the full string.
Feel free to contact me if you require further information.
Kind Regards
Mike
The text was updated successfully, but these errors were encountered: