Essentially, the only person that should be able to change the "is_admin" property is an admin, if the password wasn't fillable, they wouldn't be able to register.
fillable, hidden and guarded
Hello everybody, I'd like to know if someone can help me with a question.
We can find here explanation on mass assignment. The example is about guarding the "is_admin" property against user hacking and changing it to "1" from "0" without the permission for it. https://laravel.com/docs/5.1/eloquent#mass-assignment
So why here: https://github.com/laravel/laravel/blob/master/app/User.php "password" is under "fillable & hidden" attributes and not under "guarded" attribute if we wont to avoid from the user to change the password manually?
Thanks, Leo.
I agree, its open for question. I was replying to comments by @jaytee and someone else that has since removed their post.
I can't though think of a plausible exploit since it is not possible for an outsider to come up with a password that can work unless they also know the key for the hashing algorithm. Therefore, the best an attacker could do is create a denial of service to an individual user. Now, if this denial then leads to the user requesting a password reset, then the attacker might be able to then exploit some other vulnerability.
Please or to participate in this conversation.