#dev 2018-04-27

2018-04-27 UTC
eli_oat, snarfed, [asuh], leg, leg1, jgmac1106, [tantek], renem, Mandrake, [chrisaldrich], oodani, tantek, cweiske, gRegorLove_, swentel, barpthewire and KartikPrabhu joined the channel
#
Zegnat
Alright, I brainstormed an idea of keeping track of the redirects that curl is following. Now to see if aaronpk has already implemented this.
#
Zegnat
I should really check his code before I start brainstorming.
chrisaldrich, Mandrake, iasai_, iasai and [jgmac1106] joined the channel
#
GWG
Zegnat: I always figure aaronpk is ahead of me.
jgmac1106 joined the channel
#
klezlab.it
edited /likes (-49) "converted image to emojicon"
(view diff)
#
www.svenknebel.de
edited /tools (+133) "/* Other Tools */ add sturdy-backbone"
(view diff)
#
www.svenknebel.de
edited /tools (-65) "/* See Also */ remove links to pages of .rocks sites"
(view diff)
#
Zegnat
Turned out, this time, no. aaronpk is looping curl requests himself to figure out the redirect path, while my brainstorm should be able to pull the path from curl itself. Time to get implementing
jeremycherfas joined the channel
#
aaronpk
Zegnat: I couldn't figure out how to use any existing libraries to give me the url stopping at a temporary redirect
[matthilt] joined the channel
#
aaronpk
I did find something that would return every http request along the way but that seemed harder for some reason
#
Zegnat
I am going to have it return the entire path it walked to get to the final resource.
#
skippy
what are you trying to accomplish?
#
Zegnat
Testing with it now. Maybe I’ll PR on p3k http, aaronpk, so you can take a look
#
aaronpk
Make sure you include each http code along with the url
#
Zegnat
That’s what I am testing right now if it is possible, aaronpk :)
#
Zegnat
skippy: permanent redirects “rewrite” a URL, so if aaronpk uses aaronpk.com, we can rewrite it to aaronparecki.com for indieauth purposes because it uses a 301. But if it had used a temporary redirect code, we shouldn’t rewrite because it might point elsewhere at a later date.
#
aaronpk
Actual example of someone who wants to use their url for IndieAuth but their url is a temporary redirect elsewhere: dreev.es
[kevinmarks] joined the channel
#
sknebel
also, me
#
Zegnat
wonders if we should document these examples of redirects somewhere
#
aaronpk
Probably
#
aaronpk
I started making some test identities when I was working on this last week
leg, deathrow1 and [tantek] joined the channel
#
aaronparecki.com
edited /Twitter (+698) "/* POSSE Articles to Twitter */ add some of my examples"
(view diff)
Mandrake, snarfed and [snarfed] joined the channel
#
aaronpk
klez: a couple things. looks like your "e-content" class contains the published date which makes the date show up in the content which is kind of weird. i'd suggest moving the published abbr outside of the e-content element
#
klez
ok, can do that
#
aaronpk
the author issue seems to be the backcompat parsing getting confused, and i'm not sure whether it's bad parsing or if the markup is wrong
#
aaronpk
in any case if you remove the "vcard" class then it looks like you'd expect
#
aaronpk
with one caveat
#
aaronpk
the URL of the author h-card inside the h-entry is "/author/federico-klez-culloca.html" and then you have a more complete h-card lower on the page with the URL "https://klezlab.it". It'd be better if those two matched, so see if you can get your home page URL https://klezlab.it into the first h-card
#
Loqi
Federico klez Culloca
#
klez
ok, trying, thanks for now :)
#
klez
aaronpk++ thanks, now it's just complaining that there's no photo, but that I think I can solve on my own once I decide I actually want a photo :) thanks again
#
Loqi
aaronpk has 140 karma in this channel (1625 overall)
[kevinmarks], AngeloGladding, deathrow1, bhh, maingo, barpthewire, gRegorLove_ and tantek joined the channel
#
GWG
Afternoon
snarfed, eli_oat, [miklb], KartikPrabhu, tantek and AngeloGladding joined the channel
#
pstuifzand
GWG, have you been able to use the latest version of Wrimini ?
tbbrown, cweiske, ALT3R3D and eli_oat joined the channel
#
pstuifzand
I'm trying to login a WordPress using the Indieauth and Micropub plugins, but I get a 401 "Unauthorized" message
snarfed joined the channel
#
aaronpk
pstuifzand: is the wordpress set to use the built-in auth endpoint?
#
pstuifzand
how can I do that?
#
aaronpk
in settings
#
pstuifzand
it's all default
#
pstuifzand
local endpoint
#
aaronpk
and you get a 401 response from the micropub request?
#
aaronpk
you were able to log in successfully?
#
pstuifzand
I have a token
#
pstuifzand
I'm not sure how to test being logged in
#
pstuifzand
It's debugging for the Android app, but I have the same problem with Quill
#
pstuifzand
I found a line about, adding the url to the profile
#
pstuifzand
I added the url I login with, as website in the profile, I think that should work
#
Loqi
[vishae] I just tried logging in with a new browser and still got the same error message. Raw response: HTTP/1.1 100 Continue HTTP/1.1 401 Unauthorized Server: nginx/1.12.2 Date: Sun, 22 Apr 2018 05:47:25 GMT Content-Type: application/json Transfer-Encoding:...
#
aaronpk
we must have some bug with the wordpress plugin
#
pstuifzand
seems similar I also get the quotes around Unauthorized
#
aaronpk
gwg heeeeelp
tantek joined the channel
#
sknebel
the plugins code is positively readable, but I don't know enough about the surrounding mechanisms for remote diagnostics
eli_oat joined the channel
#
sknebel
(e.g. there's a bunch of errors being created for various cases, but I don't know if and how they'd surface here...)
#
pstuifzand
it seems the user can't be found
#
aaronpk
that's odd
snarfed joined the channel
#
pstuifzand
get_current_user_id returns something falsy
#
sknebel
are you adding debug info right now, or just reading the source?
#
sknebel
the function for that in wordpress-indieauth creates WP_Error objects for a bunch of cases, but I don't know where those become visible
#
pstuifzand
If I remove that bit, a post get's created, but without the author
#
aaronpk
sounds like the indieauth plugin is not initializing the session right for the micropub plugin to pick it up with get_current_user_id
#
sknebel
get_current_user_id is supposed to call determine_current_user in wordpress-indieauth/includes/class-indieauth-authenticate.php
#
aaronpk
oh howd you find that
#
sknebel
so checking that that gets properly called and what it does would be my next step
#
sknebel
aaronpk: by reading the source of get_current_user_id, seening that that checks a filter named "determine_current_user" and searching the inideauth plugin for that filter
#
pstuifzand
verify_access_token returns false
#
pstuifzand
{"error":"parameter_absent","error_description":"Bearer Token Not Supplied"}
#
pstuifzand
but it was added to the headers...
#
pstuifzand
it's the result of POSTing to the token_endpoint
#
sknebel
what is your token endpoint?
#
pstuifzand
it's the wordpress one
eli_oat joined the channel
#
pstuifzand
it was a GET request
#
pstuifzand
not a POST
#
aaronpk
with the http header?
#
sknebel
verification is supposed to be a GET, thats fine
#
pstuifzand
The request contains the Authorization header with the Bearer + token
#
aaronpk
i know some web servers strip the authorization header
#
sknebel
but then it wouldn't get to micropub endpoint either
#
pstuifzand
could that be it?
#
aaronpk
can you tell whether the header is being set at all? maybe dump $_SERVER somewhere?
#
sknebel
the micropub endpoint got the header though
#
sknebel
otherwise it wouldn't have gone so far as to try verify it
#
aaronpk
oh huh
#
sknebel
unless it's somehow only filtered for local requests?
#
pstuifzand
authorization header is not in $_SERVER
#
pstuifzand
... why?
#
aaronpk
hm, another thought
#
aaronpk
the plugin makes an http request to itself to verify the token
#
aaronpk
could be that request is failing for some reason, like a bad cert or something
#
pstuifzand
it's http
#
aaronpk
there's a bunch of limitations on wp_safe_remote_get
#
sknebel
the complaint about the missing header is the response from the token endpoint, right?
#
aaronpk
this plugin shouldn't make an http request to validate the token, it should just look it up in the database
#
aaronpk
i bet that would solve it
#
pstuifzand
yeah, it's the resposne from the token endpoint
#
pstuifzand
looking it up in the database would be better
#
aaronpk
i had a feeling this was going to come back to bite us
#
pstuifzand
but there is also a path with custom endpoints
#
tantek
is lost in this discussion and needs to read logs
#
aaronpk
dont worry about it
#
aaronpk
it's wordpress internals
#
tantek
hah and here I thought it was indieauth internals\
#
aaronpk
we're way deep in the wordpress pugins
#
tantek
goes to meat
#
tantek
I mean meta
#
tantek
darn it
#
pstuifzand
this fix also works
#
aaronpk
that *was* the problem??
#
pstuifzand
on Apache, that will add the Authorization header back
#
aaronpk
so how did the micropub plugin get the header in the first place?
#
pstuifzand
I'm don't think I understand the question
#
aaronpk
what's weird is the micropub plugin was not complaining about the missing header
#
aaronpk
the error was not "missing access token"
#
aaronpk
it was only when it then made the api request to the token endpoint that the header looked like it was missing
#
sknebel
... was it a formencoded request with the token in the params?
#
sknebel
I always forget those exist
#
tantek
aside: still testing and coding emoji-detection related code.
#
pstuifzand
I only read the installation pages
#
pstuifzand
Didn't know .htaccess fix was need ... :(
#
sknebel
could the plugin test this itself during installation?
#
aaronpk
yes, also it should just not make an http request to itself
#
sknebel
make a request against itself and check if the header goes through?
#
pstuifzand
With this change I can also post from Wrimini to Wordpress!! :D
#
cweiske
5th gravcms PR sent
#
cweiske
it's always the same. As soon as you begin to actually use some software, bugs and missing features pop up everywhere
#
aaronpk
what's really fascinating to me is all the services that have popped up to fill the "missing features" in twitter like scheduling tweets
#
GWG
I see help. Heading home. Will look. Wrimini doesn't redirect for me.
#
Loqi
[aaronpk] #43 Do local token lookup instead of making an HTTP request
#
aaronpk
GWG we got it sorted out but that ^^ should be your next priority on the plugin :)
#
Loqi
[sknebel] #129 check if Authorization: header is working on install
#
aaronpk
sknebel++
#
Loqi
sknebel has 34 karma in this channel (95 overall)
#
pstuifzand
GWG, I see the switching between the app and browser is not yet very stable
#
pstuifzand
But it works for me when I try a few times
#
pstuifzand
But it needs some more polish
#
pstuifzand
Thanks for the help, aaronpk and sknebel
#
pstuifzand
I gotta go
snarfed and KartikPrabhu joined the channel
#
GWG
I just parked. Going to put dinner in to cook, and then I might fix whatever it is now
#
GWG
Okay.Once my Instapot starts instapotting, I'll read up
#
GWG
Okay...guess I have my work cut out for me.
#
aaronpk
hopefully that isn't too hard
#
GWG
aaronpk: I have to go back anyway.
#
GWG
snarfed pointed out I should try an alternate scope and response methodology I want to try
#
aaronpk
i'd say tackle the token lookup first and try to push an update for that first
#
aaronpk
we have a lot of people actually stuck because of that right now
#
GWG
It has to do both versions to cover the IndieAuth.com soon IndieLogin scenario. So I have to fiddle
#
aaronpk
now that the choice is a radio button that selects "local auth" it should be doable
#
GWG
aaronpk: Exactly
#
loqi.me
created /fragments (+21) "prompted by tantek and redirect added by tantek"
(view diff)
eli_oat joined the channel
#
tantek.com
edited /capability-urls (+36) "add link from dupe page"
(view diff)
#
tantek.com
edited /Capability_URLs (-159) "redir dupe to old page"
(view diff)
AngeloGladding joined the channel
#
aaronparecki.com
edited /Category:IndieAuth (+33) "/* Services and Source Code */"
(view diff)
[mrkrndvs], leg and gRegorLove_ joined the channel
snarfed joined the channel
#
GWG
aaronpk: In an updated version?
#
GWG
Okay.
#
GWG
I'd like to see a copy in exchange.
#
GWG
I don't need another printed one
#
aaronpk
i can do that
#
aaronpk
it will also be online
#
GWG
I know.
#
GWG
But I posted the image on my website.
#
GWG
So, I already am publicly sharing it
#
skippy
would listing syndication URLs in <link>s in my <head> work? or is u-syndication only valid for <a> in the body?
#
aaronpk
if you have "h-entry" on the <html> tag you could do that
#
skippy
ah. i have h-entry on a div inside the <html>
#
aaronpk
the u-syndication just has to be inside the h-entry for it to count
#
GWG
aaronpk: I think I finished the fix
#
aaronpk
GWG: that was fast!
#
KartikPrabhu
skippy: all mf2 properties like p-* u-* e-* only count inside a root microformats h-*
[miklb] joined the channel
#
[miklb]
KartikPrabhu++ I’m not sure I’ve seen that so simply explained
#
Loqi
kartikprabhu has 20 karma in this channel (195 overall)
#
skippy
ok. i'm noodling through if and how to display syndication links.
#
skippy
not sure it adds anything to the user.
#
GWG
skippy: I display them
#
skippy
s/to/for/
#
skippy
yes, i see many do display them. just not sure of the overall utility.
[chrisaldrich] joined the channel