-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Unexpected argument exception within login process #18697
Comments
As temporary solution found:
by adding string validations everywhere. I don't know is it valid solution, maybe this patch should be included in core? |
If this is an actual security issue (which I'm not sure it is), you should email Taylor, not post it publicly |
This is not so critical, because you cannot bypass login and authorise, but if logs are turned on, and stack trace is visible only |
You can submit a PR for that if you don't mind,, if you forget / don't want to submit one then I'll submit one for the fix... What you did here should be good to go, also we can close this and discuss it there... |
why do you pass the email field wrapped in an array? 'email' => [$user->email], should be 'email' => $user->email, |
@jerguslejko they're saying if the user passed that value, like |
@jerguslejko, I follow simple rule: "Don't trust user input", they shown for me that this part is not bullet proof as you can see. |
@webmake - you need to use rules like |
@laurencei do you understand that is core laravel function? Why I should overwrite and fix laravel? I made PR that everybody would take this patch :) Thanks for the merge |
But there are times you want an I made a PR to help include string validation for login as part of a default application to help people for future projects - which has been merged. |
If you are talking about this laravel/laravel#4212 as I understand it fixes only registration, but login is fixed by this https://github.com/webmake/framework/pull/1/files or not? o.O Maybe I didn't find proper place to validate, but by default there is no array in forms, so might arrise error as in my case |
@webmake - yes - that would seem like a good idea for a PR. You should submit it for consideration for Taylor and see what he thinks IMO. |
Seems I didn't make proper PR :D this was standing in my repo and invisible for others... |
The methods in these traits are simply starter boilerplate code. The intent is for you to use them if they match your specific use-case and if not, override them in your controller. Personally, I would get more mileage from these methods if they were left untouched. With these added validations, I'll need to override more often. |
I'd say that most people take this functionality and suppose that it is working out of box, but actually now validators are too weak. Move over, if people overwrite, it won't break anything. What was your case that you overwrote @devcircus ? Do you really have arrays? |
Closing since the PR was merged: #18746 Thanks :) |
Description:
due security issues cannot provide full stack trace.
Steps To Reproduce:
Include in any controller
AuthenticatesUsers
trait, and provide such values:To sum up,
AuthenticatesUsers
has methodlogin
, which callsThrottlesLogins
trait to get the keythrottleKey
, butusername
method extracts 'email' field, which was array, solower
gives exception.How to filter properly before the trait?
The text was updated successfully, but these errors were encountered: