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

Disable message interpolation in ConstraintViolations by default #3208

Merged
merged 1 commit into from Mar 26, 2020

Conversation

joschi
Copy link
Member

@joschi joschi commented Mar 26, 2020

Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with SelfValidating#escapeExpressions().

Additionally, ConstraintViolations now provides a set of methods which take a map of message parameters for interpolation. These message parameters are be escaped by default.

Thanks to @pwntester and @gsmet for their invaluable input!

Refs #3153
Refs #3157

Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`.

Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation.
The message parameters will be escaped by default.

Refs #3153
Refs #3157
@joschi joschi added this to the 2.0.3 milestone Mar 26, 2020
@joschi joschi requested review from jplock and pkwarren March 26, 2020 08:14
@joschi joschi self-assigned this Mar 26, 2020
@joschi joschi requested a review from a team March 26, 2020 09:00
@pwntester
Copy link

LGTM, thanks!

@joschi joschi merged commit d5a512f into master Mar 26, 2020
@joschi joschi deleted the self-validating-interpolation branch March 26, 2020 17:08
joschi added a commit that referenced this pull request Mar 26, 2020
Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`.

Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation.
The message parameters will be escaped by default.

Refs #3153
Refs #3157
Refs #3208
joschi added a commit that referenced this pull request Mar 26, 2020
Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`.

Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation.
The message parameters will be escaped by default.

Refs #3153
Refs #3157
Refs #3208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants