< 162022-11-17⋎18 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
00:19*jamesbond78 has joined
00:20jamesbond78hello
00:20*AnasHaddad[m] has joined
00:20*kunigunde[m] has joined
00:20*farmtech[m] has joined
00:21*EricLarese[m] has joined
00:21*jamesbond78 has quit (Client Quit)
00:21*postmanpat[m] has joined
00:21*munjoma[m] has joined
00:21*dazinism[m] has joined
00:21*IyarkaiTechLab[m has joined
00:22*Adam[m]123 has joined
00:22*CarlosAlberto[m] has joined
00:22*runfastthinkslow has joined
00:22*nickhudson[m] has joined
00:23*SpencerOnazi[m] has joined
00:23*OmkarEkbote[m] has joined
00:23*petednz[m] has joined
00:23*and712[m] has joined
00:23*Anonymous[m]1210 has joined
00:24*davd[m] has joined
00:24*frederike[m] has joined
00:24*goldi[m] has joined
00:24*gretel[m] has joined
00:25*gunter[m] has joined
00:25*harry[m] has joined
00:25*hra38192639[m] has joined
00:25*iuresearcherpw[m has joined
00:25*mindcls[m] has joined
00:26*olaf[m]1 has joined
00:26*phantomse[m] has joined
00:26*raul[m]1 has joined
00:26*scrdcow[m] has joined
00:26*skipper_is[m] has joined
00:27*steinfarm[m] has joined
00:27*AllanMacGregor[m has joined
00:27*qoyyuum[m] has joined
00:27*shane_aldrich[m] has joined
00:27*toino[m] has joined
00:28*aislinnpearson[m has joined
00:28*JanSonntag[m] has joined
00:28*ludwa6[m] has joined
00:28*thattechguy[m] has joined
00:29*Noaht[m] has joined
00:29*ChristophWolfes[ has joined
00:29*matrixtrix[m] has joined
00:29*sgoodall[m] has joined
00:29*oliverp44[m] has joined
00:30*FreshiesFarmsLLC has joined
00:30*RogerioMbuli[m] has joined
00:30*MarcosCarballal[ has joined
00:30*FeiWang[m] has joined
00:30*UgeshB[m] has joined
00:30*margeo[m] has joined
00:31*donblair[m] has joined
00:31*zackmuma[m] has joined
00:31*justgav[m] has joined
00:31*JustGav[m]1 has joined
00:32*m035[m] has joined
00:32*TheSlurpee[m] has joined
00:32*EvanKelley[m] has joined
00:32*ZaneBelkhayat[m] has joined
00:32*elpronto[m] has joined
00:33*dzfarmer[m] has joined
00:33*courtneylking[m] has joined
00:33*testuser769[m] has joined
00:33*GuilhermePerotta has joined
00:34*monkeyflowerfarm has joined
00:34*botlfarm[m] has joined
00:34*MattFletcher[m] has joined
00:34*tool172[m] has joined
00:34*ggcc18[m] has joined
00:35*thattechguy99[m] has joined
00:35*lauriewayne[m] has joined
00:35*GudjonEinarMagnu has joined
00:35*ThimmZwiener[m] has joined
00:35*leku[m] has joined
00:36*RafatKhashan[m] has joined
00:36*nzsnowman[m] has joined
00:36*sandg100[m] has joined
00:36*r3c4ll[m] has joined
00:37*eddieironsmith[m has joined
00:37*GerardoLisboa[m] has joined
00:37*JustinCampbell[m has joined
00:37*ionitatelecom[m] has joined
00:37*gbathree[m] has joined
00:38*perfectinfoseeke has joined
00:38*KarsonWynne[m] has joined
00:38*BrandonSmith[m] has joined
00:38*leogaggl[m] has joined
00:38*ander[m] has joined
01:58symbioquine[m]<symbioquine[m]> "But on the other hand we have..." <- Any thoughts on this paul121 ?
01:59symbioquine[m]<symbioquine[m]> "For example, it's pretty..." <- RE ^
04:05paul121[m]<symbioquine[m]> "Any thoughts on this paul121 ?" <- Huh, so naively I would think that `data.items` should reference all of the asset type schemas? But it seems like the weird thing is `data.items` is an object, and the `$ref` key is already defined so we can't simply define `data.items.$ref` multiple times for each... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
04:05paul121[m]credit this SO: stackoverflow.com/questions/29781040/jso
04:05paul121[m]I don't interact with json schema too much so this is pushing my knowledge haha
04:07paul121[m]and json-schema.org/understanding-json-schem
04:43symbioquine[m]> <@paul121:matrix.org> Huh, so naively I would think that `data.items` should reference all of the asset type schemas? But it seems like the weird thing is `data.items` is an object, and the `$ref` key is already defined so we can't simply define `data.items.$ref` multiple times for each asset type?... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
04:51symbioquine[m]<symbioquine[m]> "> <@paul121:matrix.org> Huh..." <- And maybe it actually already would work that way once www.drupal.org/project/jsonapi_schema/is is fixed;
04:51symbioquine[m]git.drupalcode.org/project/jsonapi_schem
04:51symbioquine[m](with the `anyOf` composition, but same idea)
04:59paul121[m]ah yeah probably!
05:01symbioquine[m]Thanks for digging into the JSON:Schema weeds. I probably should have done it myself before asking... Just thought you might already have thought about that bit :)
05:03paul121[m]No worries. I haven't used the `resource/relationship` endpoints nor much of the json schema so it was a nice adventure
05:05paul121[m]> <@symbioquine:matrix.org> And maybe it actually already would work that way once www.drupal.org/project/jsonapi_schema/is is fixed;
05:05paul121[m]> git.drupalcode.org/project/jsonapi_schem
05:05paul121[m]it's weird the bug that's causing this is the type mismatch between `ResourceType` and `string`. it seems like that is a fundamental concept that would lead to other bugs
05:06symbioquine[m]I think the issue description addresses that...
05:06symbioquine[m]That most of the changes were made to switch to string, but that one was missed.
05:07*uploaded an image: (23KiB) < libera.ems.host/_matrix/media/v3/downloa >
05:07symbioquine[m]Maybe that was just a guess ^ though
09:00*kunigunde[m] has quit (Quit: You have been kicked for being idle)
09:00*farmtech[m] has quit (Quit: You have been kicked for being idle)
09:00*EricLarese[m] has quit (Quit: You have been kicked for being idle)
09:00*Adam[m]123 has quit (Quit: You have been kicked for being idle)
09:00*postmanpat[m] has quit (Quit: You have been kicked for being idle)
09:00*munjoma[m] has quit (Quit: You have been kicked for being idle)
09:00*AnasHaddad[m] has quit (Quit: You have been kicked for being idle)
09:00*CarlosAlberto[m] has quit (Quit: You have been kicked for being idle)
09:00*dazinism[m] has quit (Quit: You have been kicked for being idle)
09:00*IyarkaiTechLab[m has quit (Quit: You have been kicked for being idle)
09:00*runfastthinkslow has quit (Quit: You have been kicked for being idle)
09:00*OmkarEkbote[m] has quit (Quit: You have been kicked for being idle)
09:00*nickhudson[m] has quit (Quit: You have been kicked for being idle)
09:00*SpencerOnazi[m] has quit (Quit: You have been kicked for being idle)
09:00*petednz[m] has quit (Quit: You have been kicked for being idle)
09:00*and712[m] has quit (Quit: You have been kicked for being idle)
09:00*Anonymous[m]1210 has quit (Quit: You have been kicked for being idle)
09:00*matrixtrix[m] has quit (Quit: You have been kicked for being idle)
09:00*gretel[m] has quit (Quit: You have been kicked for being idle)
09:00*hra38192639[m] has quit (Quit: You have been kicked for being idle)
09:00*gunter[m] has quit (Quit: You have been kicked for being idle)
09:00*phantomse[m] has quit (Quit: You have been kicked for being idle)
09:00*davd[m] has quit (Quit: You have been kicked for being idle)
09:00*iuresearcherpw[m has quit (Quit: You have been kicked for being idle)
09:00*mindcls[m] has quit (Quit: You have been kicked for being idle)
09:00*raul[m]1 has quit (Quit: You have been kicked for being idle)
09:00*frederike[m] has quit (Quit: You have been kicked for being idle)
09:00*goldi[m] has quit (Quit: You have been kicked for being idle)
09:00*harry[m] has quit (Quit: You have been kicked for being idle)
09:00*olaf[m]1 has quit (Quit: You have been kicked for being idle)
09:00*skipper_is[m] has quit (Quit: You have been kicked for being idle)
09:00*steinfarm[m] has quit (Quit: You have been kicked for being idle)
09:00*AllanMacGregor[m has quit (Quit: You have been kicked for being idle)
09:00*toino[m] has quit (Quit: You have been kicked for being idle)
09:00*qoyyuum[m] has quit (Quit: You have been kicked for being idle)
09:00*aislinnpearson[m has quit (Quit: You have been kicked for being idle)
09:00*JanSonntag[m] has quit (Quit: You have been kicked for being idle)
09:00*sgoodall[m] has quit (Quit: You have been kicked for being idle)
09:00*ludwa6[m] has quit (Quit: You have been kicked for being idle)
09:00*Noaht[m] has quit (Quit: You have been kicked for being idle)
09:00*ChristophWolfes[ has quit (Quit: You have been kicked for being idle)
09:00*shane_aldrich[m] has quit (Quit: You have been kicked for being idle)
09:00*RogerioMbuli[m] has quit (Quit: You have been kicked for being idle)
09:00*oliverp44[m] has quit (Quit: You have been kicked for being idle)
09:00*MarcosCarballal[ has quit (Quit: You have been kicked for being idle)
09:00*donblair[m] has quit (Quit: You have been kicked for being idle)
09:00*FreshiesFarmsLLC has quit (Quit: You have been kicked for being idle)
09:00*thattechguy[m] has quit (Quit: You have been kicked for being idle)
09:00*FeiWang[m] has quit (Quit: You have been kicked for being idle)
09:00*UgeshB[m] has quit (Quit: You have been kicked for being idle)
09:00*JustGav[m]1 has quit (Quit: You have been kicked for being idle)
09:00*EvanKelley[m] has quit (Quit: You have been kicked for being idle)
09:00*justgav[m] has quit (Quit: You have been kicked for being idle)
09:00*m035[m] has quit (Quit: You have been kicked for being idle)
09:00*zackmuma[m] has quit (Quit: You have been kicked for being idle)
09:00*elpronto[m] has quit (Quit: You have been kicked for being idle)
09:00*TheSlurpee[m] has quit (Quit: You have been kicked for being idle)
09:00*ZaneBelkhayat[m] has quit (Quit: You have been kicked for being idle)
09:00*testuser769[m] has quit (Quit: You have been kicked for being idle)
09:00*GuilhermePerotta has quit (Quit: You have been kicked for being idle)
09:00*dzfarmer[m] has quit (Quit: You have been kicked for being idle)
14:44mstenta[m]symbioquine paul121 should we commit the patch for that issue?
14:58mstenta[m]www.drupal.org/project/farm/issues/31899
15:01symbioquine[m]Hmmm, just because I keep noticing it doesn't mean that it's blocking anyone... :)
15:01mstenta[m]Well it's been 2 years since I said "let's see what happens upstream" :-)
15:01mstenta[m]🦗
15:01symbioquine[m]haha, yeah
15:02symbioquine[m]I'm going to try applying your patch locally and see what happens
15:02mstenta[m]it's sooo simple - i do think that it was just missed during a refactor, now that i look at it again
15:03mstenta[m]but then again, that assumes it DID work as intended previously
15:03mstenta[m]so yea... let me know what you find
15:05symbioquine[m]Yep, that seems to work
15:05mstenta[m]great!
15:06mstenta[m]I'll add the patch to farmOS and close our tracking issue
15:06*uploaded an image: (109KiB) < libera.ems.host/_matrix/media/v3/downloa >
15:06symbioquine[m]The title is kind of weird...
15:07mstenta[m]yea that is weird
15:07symbioquine[m]> "Water assets, and Water assets"
15:07symbioquine[m]But it's doing the `.definitions.data.items.anyOf.*` part right
15:07symbioquine[m]The title is kind of cosmetic compared with that part
15:07mstenta[m]good good
15:08mstenta[m]yea i bet the title is generated somewhere more generally for schemas - curious what the logic is there
15:14symbioquine[m]Troubleshooting that title bit a little, then I'll try to post a comment on the upstream issue...
15:24*sent a patch code block: libera.ems.host/_matrix/media/v3/downloa
15:24symbioquine[m]There's a second tiny bug in there :)
15:24symbioquine[m]Going to submit an updated patch on the upstream issue.
15:25mstenta[m]is that a different issue?
15:26symbioquine[m]Arguably, but they're both so tiny...
15:26symbioquine[m]Could go either way
15:28mstenta[m]I would open a second issue in the upstream repo, but we can add both patches to farmOS
15:28mstenta[m]If it's not the same exact error message
15:28symbioquine[m]Fair enough
15:29mstenta[m]They may end up wanting automated tests on both before anything gets merged (if anyone ever looks at it)
15:29mstenta[m]I'll add the first one's patch right now
15:40symbioquine[m]www.drupal.org/project/jsonapi_schema/is
15:43symbioquine[m]And replied on www.drupal.org/project/jsonapi_schema/is
15:46mstenta[m]Awesome!
15:46mstenta[m]I'll add that patch to farmOS too
16:00*monkeyflowerfarm has quit (Quit: You have been kicked for being idle)
16:00*MattFletcher[m] has quit (Quit: You have been kicked for being idle)
16:00*tool172[m] has quit (Quit: You have been kicked for being idle)
16:00*botlfarm[m] has quit (Quit: You have been kicked for being idle)
16:00*ggcc18[m] has quit (Quit: You have been kicked for being idle)
16:00*RafatKhashan[m] has quit (Quit: You have been kicked for being idle)
16:00*thattechguy99[m] has quit (Quit: You have been kicked for being idle)
16:00*lauriewayne[m] has quit (Quit: You have been kicked for being idle)
16:00*ThimmZwiener[m] has quit (Quit: You have been kicked for being idle)
16:00*GudjonEinarMagnu has quit (Quit: You have been kicked for being idle)
16:00*nzsnowman[m] has quit (Quit: You have been kicked for being idle)
16:00*sandg100[m] has quit (Quit: You have been kicked for being idle)
16:00*eddieironsmith[m has quit (Quit: You have been kicked for being idle)
16:00*leku[m] has quit (Quit: You have been kicked for being idle)
16:00*r3c4ll[m] has quit (Quit: You have been kicked for being idle)
16:00*GerardoLisboa[m] has quit (Quit: You have been kicked for being idle)
16:00*JustinCampbell[m has quit (Quit: You have been kicked for being idle)
16:00*perfectinfoseeke has quit (Quit: You have been kicked for being idle)
16:00*KarsonWynne[m] has quit (Quit: You have been kicked for being idle)
16:00*gbathree[m] has quit (Quit: You have been kicked for being idle)
16:00*BrandonSmith[m] has quit (Quit: You have been kicked for being idle)
16:00*ionitatelecom[m] has quit (Quit: You have been kicked for being idle)
16:00*ander[m] has quit (Quit: You have been kicked for being idle)
16:00*leogaggl[m] has quit (Quit: You have been kicked for being idle)
16:32paul121[m]does jsonapi_schema even have tests? It doesn't seem like it... I'm going to set to RTBC
16:32mstenta[m]ha good question
16:54symbioquine[m]Looks like the commit got created, but the Tweet/Toot didn't seem to go out: github.com/farmOS/farmOS-microblog/commi fosstodon.org/@farmOS
16:54mstenta[m]Oh dangit!
16:54symbioquine[m]Guessing it has to do with commits created by one workflow not necessarily triggering another...
16:55mstenta[m]checking...
16:55mstenta[m]Oh I see what you mean yea... it did commit them
16:55mstenta[m]Womp
16:56symbioquine[m]stackoverflow.com/questions/73631383/tri
16:56mstenta[m]I will manually toot/tweet this one
16:57symbioquine[m]jahed.dev/2021/04/24/triggering-github-a
16:59evered[m]is there a dev call this morning?
17:00mstenta[m]indeed! fosstodon.org/@farmOS/109360202102413686
17:00evered[m]thank you
17:36mstenta[m]github.com/farmOS/farmOS.org/pull/63
18:41mstenta[m]paul121 symbioquine sorry I had to jump off... did you find anything else on the client_secret stuff?
18:42mstenta[m]does it seem like we'll have to shim this in farmOS, at least temporarily?
18:42mstenta[m](will it break ALL current integrations? aggregator? Farmer Ed 's node red stuff? Rothamsted python scripts? unknown other usages? etc?)
18:45paul121[m]we're still in the room if you want to join :-)
18:45paul121[m]ah Morgan may be leaving!
18:48paul121[m]tldr; although we set `client_secret = ''`, it is still setting a secret in the DB (hashing an empty string?)
18:48paul121[m]BUT if we set `client_secret = NULL` then everything works :-)
18:49paul121[m]I'm referring to this in `farm_api.install`: github.com/farmOS/farmOS/blob/03279969ab
18:50mstenta[m]oh!
18:51mstenta[m]interesting
18:51mstenta[m]so... it's just on the client creation?
18:51paul121[m]yes, it seems so
18:51mstenta[m]doesn't require changes to the code that's making requests?
18:51paul121[m]mstenta[m]: correct
18:51mstenta[m]ok so we should update the default farm client
18:51mstenta[m]and the surveystack aggregator client
18:52mstenta[m]will we need an update hook?
18:52mstenta[m]or just for NEW clients?
18:52paul121[m]although... symbioquine seemed to see that his default `farm` client *does have* a secret set in his install.. still using 5.0.6... which is interesting.
18:53mstenta[m]huh
18:53paul121[m]I think I have noticed another bug, however, where if you add a secret to the `farm` client via the UI, there is no way to clear the client secret (I've only tested this in 5.2.2)
18:53paul121[m]so it may be possible that Morgan set a client secret some time ago?
18:53mstenta[m]ah
18:53mstenta[m]hmm
18:53symbioquine[m]paul121[m]: I suppose it's possible
18:54symbioquine[m]Like you said on the call, I'd be curious what it looks like on other production installations...
18:54symbioquine[m]Presumably they should mostly be null for the installs that Farmier hosts right?
18:55mstenta[m]i can check some real quick
18:55mstenta[m]do you have a query off hand?
18:55symbioquine[m]Hmmm, just a sec...
18:57symbioquine[m]Maybe something like `SELECT * FROM public.consumer_field_data WHERE label = 'Farm default'`?
18:58symbioquine[m]`SELECT label, secret FROM public.consumer_field_data WHERE label = 'Farm default'`
18:58mstenta[m]i just sampled three and they all had secrets
18:58paul121[m]hmmm same on one of mine...
18:58mstenta[m]although... could it be that they are just encrypted empty strings?
18:59symbioquine[m]I mean that's the hypothesis...
18:59mstenta[m]they are different, but might be salted
18:59symbioquine[m]I wonder what happens if we change the curl request to pass '' as the client secret?
19:03paul121[m]it may be this line: git.drupalcode.org/project/simple_oauth/
19:06paul121[m]I'm trying to pass `client_secret=` and it doesn't work. When I passed `client_secret=''` in my debugger it showed up as a `"''"`
19:06paul121[m]* doesn't work, I get client authentication error. When
19:08paul121[m]<paul121[m]> "it may be this line: git..." <- ah of course... it is this line. specifically the `$client_secret && .... `, when `$client_secret = ''` it evaluates to FALSE
19:08*sent a code block: libera.ems.host/_matrix/media/v3/downloa
19:09mstenta[m]you were right paul121 - we should have added a test for a client without a secret :-)
19:10mstenta[m]would have caught this right away'
19:11paul121[m]yeaaa
19:13paul121[m]so... I'm trying to think what the solution is here
19:14paul121[m]<paul121[m]> "it may be this line: git..." <- That was added with this commit: git.drupalcode.org/project/simple_oauth/
19:14paul121[m]This issue: www.drupal.org/project/simple_oauth/issu
19:18paul121[m]aha okay I understand... let me grok....
19:25paul121[m] * Two things changed from 5.0.x to 5.2.x in this commit: git.drupalcode.org/project/simple\_oauth
19:25paul121[m]1. If a consumer has a client secret it is always validated, even if the client is non-confidential. This makes sense, but the issue is that our `farm` client had a secret which was the hashed empty string `client_secret = ''` :-(
19:25paul121[m]Relevant code: git.drupalcode.org/project/simple\_oauth
19:25paul121[m]...(truncated)
19:25paul121[m]Two things changed from 5.0.x to 5.2.x:... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
19:27mstenta[m]would this be considered a bug in simple_oauth?
19:27mstenta[m]still understanding
19:28mstenta[m]it's certainly a breaking change right?
19:28paul121[m] * Two things changed from 5.0.x to 5.2.x in this commit: git.drupalcode.org/project/simple\_oauth... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
19:28paul121[m]Right.... it's a breaking change, but yeah, I feel like simple_oauth won't really want to help us out with this? It's kinda our problem for using an empty string?
19:29mstenta[m]Is their code "correct" though?
19:29paul121[m]I mean there should be some validation to prevent storing the `client_secret` as an empty string, that is a bug that is 100% possible to do right now
19:30mstenta[m]Can we do an update hook to clear the `secret` if it is an empty string hashed?
19:30mstenta[m]Sorry hard to focus right now... might need to look at this in a more dedicated session later
19:31paul121[m]Yeah, I think that would be possible!
19:32mstenta[m]Would it fix the issue?
19:32mstenta[m]Without requiring changes on clients?
19:32paul121[m]They are using the Drupal core password checker interface: git.drupalcode.org/project/simple_oauth/
19:32paul121[m]git.drupalcode.org/project/simple_oauth/
19:33mstenta[m]Makes sense, so it's probably using the same salt
19:33mstenta[m]This is a unique case where we can test to see if a salted hashed password equals a known value :-)
19:33mstenta[m](empty)
19:33paul121[m]I believe that would fix the issue. No changes for oauth clients, but changes for the consumer/client
19:33paul121[m]mstenta[m]: very unique!
19:34mstenta[m]So... an update hook to clear the secret field... and update modules that add a client so that it sets it to `NULL`?
19:36paul121[m]now.... there are two more general issues with 5.2.x:
19:36paul121[m]- If you provide a client secret via the UI, there is no way to "clear" that client secret via the UI....
19:36paul121[m]- It appears there is a bug where the `openid` scope cannot be used with 5.2.x. We don't need this for farmOS core, but if people use farmOS as an OAuth server this might be a requirement (Morgan is). Open issue: www.drupal.org/project/simple_oauth/issu
19:36mstenta[m]hmm
19:37mstenta[m]the first one sounds pretty minor... (should open an issue for it) i imagine the solution is: if the field is blank, set db col to `NULL`?
19:41symbioquine[m]mstenta[m]: The form field is always empty (unless a new value has been provided) since it never shows the existing secret - I think it actually can't since it's hashed (right?)
19:41symbioquine[m]You'd need something like a checkbox that means clear/reset the value
19:42paul121[m]Exactl
19:42paul121[m] * Exactly
19:44mstenta[m]Oh gotcha - didn't look
19:44mstenta[m]Maybe the form field should show `*****` if not `NULL!
19:45mstenta[m]s/!/`/
19:45mstenta[m]Meh... checkbox might be better
19:46mstenta[m]Anyway, that's annoying and def an upstream, but not super in-scope for us right now
19:46mstenta[m]symbioquine: can you sanity check this for me when you have a moment? github.com/farmOS/farmOS-microblog/pull/
19:47symbioquine[m]I guess we're assuming GitHub Actions already have the ssh hostkeys trusted?
19:47symbioquine[m](seems like a reasonable assumption)
19:47mstenta[m]oh you mean so it doesn't get hung up on that stupid "yes/no" prompt?
19:48mstenta[m](it's not stupid... it's good. i just always get hung up on it myself lol)
19:48symbioquine[m]yeah
19:48mstenta[m]well... if it doesn't work, then the action will fail... so worth a test?
19:49symbioquine[m]Just reading up on that `ssh-key` argument. I don't think I've used that before...
19:50symbioquine[m]I guess baked into that change is the assumption that checking out the repository with that key will subsequently enable future pushes from the checked out repository using the same key.
19:50symbioquine[m]I don't know whether that's true.
19:50symbioquine[m]It's a little different than the strategy I'm using [here](symbioquine.net/2022-09-28-github-action) where I explicitly add the key to ssh-agent.
19:51mstenta[m]`ssh-key` is what he used in jahed.dev/2021/04/24/triggering-github-a
19:51symbioquine[m]ah!
19:52symbioquine[m]Cool, I guess it can't hurt to try it :)
19:54mstenta[m]Merged... we'll see next week if it worked :-)
19:54mstenta[m](Gives me a reason to post more often while debugging haha)
19:54symbioquine[m]and now we wait :)
19:56mstenta[m]if this works then it will clear the way for github.com/farmOS/farmOS/commit/6712a5a7 (using deploy key instead of PAT)
19:56mstenta[m]so maybe we should wait until next thursday to tag a new release :-)
19:57symbioquine[m]Hmmm
19:57mstenta[m](pending this bug getting fixed, and the migration one that paul121 and I started)
19:59mstenta[m]gotta go pick up kids 👋
20:11mstenta[m]paul121: could the empty hash check happen in simple_oauth?
20:11symbioquine[m]mstenta[m]: I was wondering the same thing
20:15mstenta[m]In the empty check
20:15mstenta[m]I think that would also essentially fix the form issue, right?
20:25symbioquine[m]I think so
20:58paul121[m]hmm where would simple oauth check that?
21:24mstenta[m]Here?
21:25mstenta[m]Here?
21:25mstenta[m]Hmm Element android wont let me quote
21:26mstenta[m]In the lines you pointed to paul121
21:26mstenta[m]Where it checks if the secret is empty
21:26mstenta[m]Seems like it could also check to see if the secret matches a hashed empty string
21:28paul121[m]Oh true. But ideally it wouldn't need to run every time?
21:28mstenta[m]What wouldn't?
21:29paul121[m]Checking for the hashed empty string on every API request
21:29paul121[m]seems like we should just not allow empty string :-)
21:29mstenta[m]Right, but it did
21:30paul121[m]I like your idea of the update hook
21:30mstenta[m]This was a breaking change
21:31mstenta[m]Yea, that works too... in simple_oauth tho or farmOS?
21:31mstenta[m]I feel like simple_oauth needs to take some responsibility here too
21:31paul121[m]I don't care where :P
21:31paul121[m]haha yeah I agree
21:32paul121[m]looking to see if the oauth spec says anything about empty strings..
21:32mstenta[m]If a quick fix is all we want then we could open an issue on simple_oauth and upload a patch that just adds an additional check for hashed empty string
21:33mstenta[m]Not as the long term solution, but just to raise attention to it and give us a workaround to unblock us
21:34mstenta[m]Regardless of what oauth spec is, if this is a breaking change they need to document that
21:34mstenta[m]And maybe it goes away in 6x
21:37paul121[m]Instead of a patch I would prefer we just add that update hook ourselves. It would be fine if simple oauth later added the same update hook, it just wouldn't do anything
21:38mstenta[m]Hmm
21:40mstenta[m]Minor but: the benefit of a patch is it goes away. Update hooks remain in the code footprint
21:42mstenta[m]> Oh true. But ideally it wouldn't need to run every time?
21:42mstenta[m]Is the concern here that it adds performance overhead?
21:43mstenta[m]Its already running the other logic every time
21:43paul121[m]kinda, its just unnecessary
21:43mstenta[m]Yea. Its only necessary because they allowed hashed empty strings to be saved in the first place
21:44mstenta[m]It does seem like simple_oauth should add an update hook to fix it, and fix the form at the same time
21:44mstenta[m]And entity save if that is causing it
21:44mstenta[m]All of this just leads me back to:
21:45mstenta[m]> Not as the long term solution, but just to raise attention to it and give us a workaround to unblock us
21:45mstenta[m]They need to fix it in 6.x regardless
21:46mstenta[m]So maybe we just have a simple patch until then
21:49paul121[m]It just seems like we could do the long term solution now.. I'd prefer that over maintaining a patch, but yes that would work
21:49mstenta[m]Yea I agree - it's just that the long term solution is in simple_oauth, not in farmOS
21:50mstenta[m]It bothers me to add an update hook for someone else's issue
21:50mstenta[m]Minor, I know... just don't like it :-)
21:51mstenta[m]Just so I understand: will we need to change the surveystack module (and any others that added a consumer in hook_install())?
21:51mstenta[m]Seems like it should "just work" without changing them
21:51mstenta[m](again pointing to the fact that this is simple_oauth's issue, not ours?)
21:52mstenta[m]like... i guess i would expect that an "empty secret" is the same as "no secret"... right?? haha
21:54paul121[m]well what is interesting is that the `consumer.secret` field is a core `Password` field type... so that field must allow the difference between NULL and `''`, not sure why
21:55paul121[m]but yes, I agree they should work the same as they did before
21:57mstenta[m]well so... what do you think about 1) opening an issue in simple_oauth, 2) creating a temporary patch (maybe just for 5.2.x) that just checks for empty hashed, 3) propose the proper solution (maybe just for 6.x) that adds an update hook and proper logic to equate NULL and empty
21:58mstenta[m]no doubt 3 will take some time for upstream maintainers to think about etc... 2 would allow us to release beta8
21:59mstenta[m]could even make a patch for 3 right after 2, start the issue for 5.2.x, and then change it to 6.x for the new patch
21:59mstenta[m](trying to think strategically here to both unblock us in the short term and solve this properly in the long term, with minimal code in farmOS)
22:00mstenta[m](i guess i also don't really know: is 6.x even using the same code now?)
22:00paul121[m]That all sounds good
22:00paul121[m]q: do you want to change all of our `hook_install` to use `NULL` right now?
22:01paul121[m]I think we should - because that seems more correct
22:01mstenta[m]i suppose we could in farmOS yes
22:04paul121[m]so for #2, what logic do we put here: git.drupalcode.org/project/simple_oauth/
22:08mstenta[m]Maybe...... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
22:09mstenta[m]could shuffle that around to make it even cleaner probably
22:11paul121[m]hmm yes and we might need to modify the code block above this too... because of the `client_credentials` edge case
22:12mstenta[m]ah yea... so maybe a block above both that sets a new `$secret_is_empty` boolean, which can be used in both below
22:13mstenta[m]`$secret_is_empty = $secret_field->isEmpty() || $this->passwordChecker->check('', $client_drupal_entity->get('secret')->value)`
22:14paul121[m]hmmm... if we include this patch we should really have tests run against it...
22:14mstenta[m]in our code? agreed.
22:14mstenta[m]> you were right paul121 - we should have added a test for a client without a secret :-)
22:15paul121[m]but we basically need to run all of the simple_oauth tests... this validation logic is pretty important for everything
22:16mstenta[m]does d.o handle that for simple_oauth now when a patch is uploaded?
22:16mstenta[m]would that cover the overall tests?
22:17paul121[m]It should. I think tests are running on gitlab now too
22:18paul121[m]Yeah I see 5.2.x pipelines there
22:18mstenta[m]cool
22:34symbioquine[m]There's an argument for having defensive tests as part of the farmOS codebase. Tests in the decencies codebase would be updated along with the functionality so they wouldn't help against intentional changes.
22:37paul121[m]how does this look?... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
22:37paul121[m] * how does this look?... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
22:39paul121[m] * how does this look?... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
22:48mstenta[m]LGTM!
23:51*summonner has joined

< 162022-11-17⋏18 >