Upon authentication approval, the user receives the following error after approving the authentication:

Notice: Undefined index: disable_auth_level_selection in oauth_common_form_authorize_validate() (line 239 of /opt/development/jobeirne/jammiejam/html/sites/all/modules/oauth/oauth_common.pages.inc).

This is because user contexts are saved without `disable_auth_level_selection` as a key in the authentication_options array if that particular checkbox is left empty in the context edit form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jobeirne’s picture

Attached is a patch for the context edit form. Instead of completely ignoring an authentication_options value if it is null in the form, it is saved in the array as null. This maintains compatibility with the plethora of `empty` checks that happen. Also included is a cosmetic cleanup of the submit function.

jobeirne’s picture

Status: Active » Closed (fixed)

Tested and committed.

kylebrowning’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Closed (fixed) » Active

This is still broken in 6.x

rjbrown99’s picture

Status: Active » Patch (to be ported)

Updating status per the issue queue handbook guidelines.

h3rj4n’s picture

Status: Patch (to be ported) » Needs work
+++ b/oauth_common.pages.inc
@@ -72,7 +72,8 @@ function oauth_common_form_authorize() {
+  $auth_ops = $context->authorization_options;
+         ¶

@@ -104,8 +105,10 @@ function oauth_common_form_authorize() {
-    if (!empty($context->authorization_options['automatic_authorization']) && $context->authorization_options['automatic_authorization'] && !empty($consumer->callback_url)) {
+       ¶

trailing white space error

I can't apply the patch on dev.

error: patch failed: oauth_common.pages.inc:140
error: oauth_common.pages.inc: patch does not apply

Tried it on a fresh pull of dev.

h3rj4n’s picture

Assigned: jobeirne » Unassigned
Status: Needs work » Needs review
FileSize
5.1 KB

This is the patch that works on D6. Haven't checked the results xD Only ported it.

  • jobeirne committed 06fb0b8 on 8.x-2.x
    Issue #1412258 by jobeirne: authentication_options fix
    
    and some minor...