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

When setting the section ID fails no exception should be thrown #310

Open
michael-e opened this issue Mar 3, 2019 · 0 comments
Open

When setting the section ID fails no exception should be thrown #310

michael-e opened this issue Mar 3, 2019 · 0 comments

Comments

@michael-e
Copy link
Member

Since the member section ID is typically set in the frontend form (using a hidden field), a (malicious) user can easily manipulate it. Of course, "evil" section IDs like %3Benv should not result in anything useful, and they don't, as far as I see.

But I suggest to remove the exception that is thrown if setting the ID fails. If somebody manipulates the section ID in a bad way, the function returns false, and there is no need to disclose any information about what went wrong in this case. In other words: The user shouldn't be able to trigger such an exception so easily, I prefer a "silent fail".

I will send a PR. I know that this can be discussed or even rejected.

michael-e added a commit to michael-e/members that referenced this issue Mar 3, 2019
The function returns false anyway; failing more silently is preferrable.

Fixes symphonycms#310
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

No branches or pull requests

1 participant