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

Bug: Posting from Omnibear with IndieAuth fails. #133

Open
miklb opened this issue Jun 15, 2018 · 12 comments
Open

Bug: Posting from Omnibear with IndieAuth fails. #133

miklb opened this issue Jun 15, 2018 · 12 comments

Comments

@miklb
Copy link

miklb commented Jun 15, 2018

Using master of WP Indieauth & micropub plugins, attempting to post from Omnibear results in 2 errors

PHP Warning:  in_array() expects parameter 2 to be array, null given in /plugins/micropub/micropub.php on line 265
 

PHP Warning:  in_array() expects parameter 2 to be array, null given in /plugins/micropub/micropub.php on line 268

I recall changes to these two lines in another issue, but do not recall where that issue was (maybe Indieauth plugin?)

Omnibear reports failure to authenticate with micropub endpoint.

@dshanske
Copy link
Member

This is interestingly telling. This suggests that somehow, the scope information isn't making it from IndieAuth into Micropub. But why would it on some sites and not on others.

@keithjgrant
Copy link

It's also strange that it would occur for Omnibear, but not some other MP clients like Quill…?

@keithjgrant
Copy link

Is Omnibear requesting scopes differently when authenticating to the auth endpoint?

@dshanske
Copy link
Member

At the very least, we should initialize the variables before use.

@keithjgrant What scopes does Omnibear request?

@keithjgrant
Copy link

Hm... Skimming the code (albeit on phone, so I could be missing something) it doesn't look like Omnibear specifies. That could be the issue, depending whether different auth services fallback to all scopes by default, or null set...?

@dshanske
Copy link
Member

We don't fallback.

@dshanske
Copy link
Member

https://indieauth.spec.indieweb.org/#authorization-request - I'd better go check my code on the IndieAuth plugin.

@dshanske
Copy link
Member

This is not related to the Semantic Linkbacks problem.

@miklb
Copy link
Author

miklb commented Jun 18, 2018

POST /?micropub=endpoint HTTP/1.1" 403 76 "-"
POST /?micropub=endpoint HTTP/1.1" 201 12 "-" "-"

Top is Omnibear, bottom is Quill in my access logs. Not sure jf anything useful there, but documenting nonetheless.

@dougbeal
Copy link

I’m running latest plugin releases. Attempted reacji w/Omnibear in firefox

webserver-wordpress_1 | 2018/07/17 06:06:48 [notice] 5#5: *6382 "^/.well-known/(host-meta|webfinger).*" does not match "/index.php", client: 71.212.132.198, server: dougbeal.com, request: "POST /?micropub=endpoint HTTP/1.1", host: "dougbeal.com" [17-Jul-2018 06:06:48 UTC] Micropub Data: {"micropub":"endpoint"} {"type":["h-entry"],"properties":{"content":["\ud83d\udc94"],"in-reply-to":["https:\/\/www.instagram.com\/p\/BlUNv51FerF\/"]}} [17-Jul-2018 06:06:49 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/wp-content/plugins/micropub/micropub.php on line 265 [17-Jul-2018 06:06:49 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/wp-content/plugins/micropub/micropub.php on line 268 wordpress_1 | 172.18.0.4 - 17/Jul/2018:06:06:48 +0000 "POST /index.php" 403 webserver-wordpress_1 | 71.212.132.198 - - [17/Jul/2018:06:06:49 +0000] "POST /?micropub=endpoint HTTP/1.1" 403 98 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:61.0) Gecko/20100101 Firefox/61.0" "-"

(Originally published at: https://crw.moe/b/Xg)

@dshanske
Copy link
Member

This has been determined to be a problem with cookie authentication preventing the token authentication from being used. Solution at this time is to log out of the site on the browser you are using to post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants