Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Http/Handlers/AuthorizeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function handle( Request $request, Response $response ): Response {

$user = wp_get_current_user();
if ( $this->consent_storage->needs_consent( $user->ID ) ) {
if ( ! isset( $_POST['authorize'] ) || 'Authorize' !== $_POST['authorize'] ) {
if ( ! isset( $_REQUEST['authorize'] ) || 'Authorize' !== $_REQUEST['authorize'] ) {
$response->send();
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/authenticate/form.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php /** @var stdClass $data */ ?>

<form method="post" action="<?php echo esc_url( $data->form_url ); ?>">
<form method="GET" action="<?php echo esc_url( $data->form_url ); ?>">
<?php wp_nonce_field( 'wp_rest' ); /* The nonce will give the REST call the userdata. */ ?>
<?php foreach ( $data->form_fields as $key => $value ) : ?>
<input type="hidden" name="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $value ); ?>"/>
Expand Down