Skip to content

Commit

Permalink
Check "redirect_to" query var is set in hidden form field.
Browse files Browse the repository at this point in the history
  • Loading branch information
benhuson committed Sep 24, 2020
1 parent 850cd0d commit 79e70d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Add a Nocache header to the login page redirect to prevent the browser from caching the redirect page. Props [De'Yonte W.](https://github.com/rxnlabs)
- Remove ‘password-protected’ query from redirects on successful login or logout.
- Check "redirect_to" query var is set in hidden form field. Props [Matthias Kittsteiner](https://wordpress.org/support/users/kittmedia/).
- Add favicon to password protected login page.

## [2.3] - 2020-05-17
Expand Down
2 changes: 1 addition & 1 deletion theme/password-protected-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function wp_login_viewport_meta() {
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" tabindex="100" />
<input type="hidden" name="password_protected_cookie_test" value="1" />
<input type="hidden" name="password-protected" value="login" />
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $_REQUEST['redirect_to'] ); ?>" />
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); ?>" />
</p>
</form>

Expand Down

0 comments on commit 79e70d0

Please sign in to comment.