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

Fix entry/connect AJAX errors (Backport) #8919

Conversation

tburry
Copy link
Contributor

@tburry tburry commented Jun 10, 2019

There were two issues with AJAX handling.

  • A code path validated the transient key rather than checking for an authenticated postback. Now that postbacks have a looser validation that is only afforded for in Gdn_Request::isAuthenticatedPostback().
  • A code path used form validation to check to see if a value was empty. This was causing the error to be added to the validation results as a side effect, resulting in the form failing. Before AJAX this was okay because validation results did not cancel a redirect. After AJAX they do.

There were two issues with AJAX handling.

- A code path validated the transient key rather than checking for an authenticated postback. Now that postbacks have a looser validation that is only afforded for in `Gdn_Request::isAuthenticatedPostback()`.
- A code path used form validation to check to see if a value was empty. This was causing the error to be added to the validation results as a side effect, resulting in the form failing. Before AJAX this was okay because validation results did not cancel a redirect. After AJAX they do.
@charrondev charrondev merged commit e5ca1bf into release/2019.007 Jun 10, 2019
@linc linc deleted the backport/349ef8b5a7043da3b83b15780eda81dc377ba46a-2 branch September 21, 2019 14:02
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

Successfully merging this pull request may close these issues.

None yet

2 participants