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.

Comments

StatusFileSize
new5.38 KB

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.

Status:Active» Closed (fixed)

Tested and committed.

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

This is still broken in 6.x

Status:Active» Patch (to be ported)

Updating status per the issue queue handbook guidelines.

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.

Assigned:jobeirne» Unassigned
Status:Needs work» Needs review
StatusFileSize
new5.1 KB

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