-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature Idea: Override Empty Values #6
Comments
Yeah, that'd be pretty neat, so you could always provide a default even if the frontend tried to clear the value. Could be useful for security too. |
Maybe a silly question, but why is this the right behaviour? Currently, a malicious user can remove an entry's field's data if they know/guess the field name and include an empty value with the POST? |
Yes, basically it is the right behaviour. The extension is called "Default Event Values", so it is supposed to provide default values that are used if nothing is posted. The option "Value will override any value posted from the frontend" can be used to make the default value override the posted value. My suggestion means something in between: Override empty values, but don't override non-empty values. There are rare use cases for this (but I don't remember mine, unfortunately). |
I see. So the current 'Value will override any value posted from the frontend' option can already be used to override empty values? Thanks. |
Yes, as it says: override any value. :-) |
Good good! The first sentence of this issue threw me. |
:-) (Speak: Yes, it was misleading.) |
If values are set in the POST array but empty, the extension will not override them (which is the right behaviour, of course). It would be cool to have an option for this, in addition to the Value will override any value posted from the frontend option. It might be called Value will override empty value posted from the frontend or similar.
The text was updated successfully, but these errors were encountered: