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

Feature Idea: Override Empty Values #6

Open
michael-e opened this issue Nov 24, 2012 · 7 comments
Open

Feature Idea: Override Empty Values #6

michael-e opened this issue Nov 24, 2012 · 7 comments

Comments

@michael-e
Copy link
Contributor

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.

@brendo
Copy link
Owner

brendo commented Dec 10, 2012

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.

@DavidOliver
Copy link

If values are set in the POST array but empty, the extension will not override them (which is the right behaviour, of course).

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?

@michael-e
Copy link
Contributor Author

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).

@DavidOliver
Copy link

My suggestion means something in between

I see. So the current 'Value will override any value posted from the frontend' option can already be used to override empty values? Thanks.

@michael-e
Copy link
Contributor Author

Yes, as it says: override any value. :-)

@DavidOliver
Copy link

Good good! The first sentence of this issue threw me.

@michael-e
Copy link
Contributor Author

:-) (Speak: Yes, it was misleading.)

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

3 participants