Should I just code in a work-around? If the Referer
is /post
then consider that total bullshit, and ignore? 🤔
Why would a Web Browser set the Referer
header incorrectly?! 🤔
Can’t reproduce with Iridium either.
Can’t reproduce with Firefox.
A initial post, reply and conv -> post (bottom of page) and nothing 🤔 All 6 requests are POST /post
followed by a GET <from>
where ever I was coming from. Hmmm 🧐 This is nuts 🌰
Test
Test
Test
/post
) on either the POST
or the GET
🤔
@eldersnake@we.loveprivacy.club Yeah no worries!
You can see here, at least, htmx knows what the current URL is:
HX-Current-URL: https://we.loveprivacy.club/conv/vcpt7gq
Referer: https://we.loveprivacy.club/post
But the freak’n browser is setting the wrong value for Referer
. There is simply no way to be on the /post
endpoint normally anyway.
/post
) on either the POST
or the GET
🤔
What Browser is this again? Does it happen with any other browser?
/post
) on either the POST
or the GET
🤔
@eldersnake@we.loveprivacy.club Ahh missed this. Fuck, that’s just silliness and not right. wtf?!
The POST /post
XHR (that is being run by htmx) should never, ever be Referer: .../post
🤦♂️
For example, this is what you should see:
@eldersnake@we.loveprivacy.club I mean on the POST /post
request itself. That’s the Referer
that’s looked up and used as the redirect.
The only way this is possible is if the Referrer
is /post
and not /
or /discover
like it should be. Can we confirm/deny this if you inspect the POST /post
requests? 🤔
See this code
if htmx.IsHTMX(r) {
htmx.NewResponse().
Location(RedirectRefererURL(r, s.config, "/")).
Write(w)
} else {
http.Redirect(w, r, RedirectRefererURL(r, s.config, "/"), http.StatusFound)
}
There is only one explanation for this… Lemme see…
Let’s focus on this ☝️ how in da fuq is this happenning?!
@eldersnake@we.loveprivacy.club LOL all good. Feel free to use https://gist.mills.io 👌
@eldersnake@we.loveprivacy.club Holy fuck?! That’s unpossible?!
Oh you deleted that last Twt 🤣
@eldersnake@we.loveprivacy.club I don’t see the subsequent GET /
, You are right that a POST /post
does an internal XHR redirect to whatever view you’re on to refresh it.
@eldersnake@we.loveprivacy.club That one was 👌
But there should never ever be a GET /post
– There is no handler/route for that, that will indeed 404, really strange you’re still seeing this? And what’s this login issue?
Upgraded my Go compiler and I’m still not able to reproduce those 404(s) you’re seeing. For clarity, this is what you expect to see in the server logs:
DEBU[0163] no subscriptions found for http://10.0.0.164:8000/user/admin/twtxt.txt
[yarnd] 2024/06/19 23:13:23 (10.0.0.164:64888) "POST /post HTTP/1.1" 200 0 8.323709ms
DEBU[0163] reloading templates in debug mode...
[yarnd] 2024/06/19 23:13:23 (10.0.0.164:64888) "GET / HTTP/1.1" 200 18120 87.933208ms
for every post there should be a POST /post ...
followed pretty quickly by a GET /
FWIW go v1.22.2
here, but I’ll upgrade now just to be sure…
@eldersnake@we.loveprivacy.club So you’re still having the exact same problems?! 🤔 And no I don’t think the version of the compiler has much to do with this 😢
* 8eef4d5d - (HEAD -> main, origin/main) Add DB restore capability and tools/backu-_db.sh script (19 seconds ago) <James Mills>
Oh well 😅 It works wonderfully!
In the event of a database corruption or loss:
$ URL=http://10.0.0.164:8000 ./tools/backup_db.sh > db.json
mv db.json data/db.restore.json
yarnd ...
@eldersnake@we.loveprivacy.club Oh well, is the pod at least behaving normally now, just like mine? 😅
@eldersnake@we.loveprivacy.club Bahahahaha 🤣 That’s sure one fire way of cleaning up house 🏠
I’ll complete the work anyway, it’s just wrapping up existing code and making backups of the database a proper thing.
@eldersnake@we.loveprivacy.club Ahh damn man haha 😝 If you had given me like ~20 more mins (just got home) I would have had a fulll backup/restore that would have been “just run this command and move this file here”. 😅
make clean
. Why I originally had them in the git directory is anyone's guess. Anyway it blew away those files including the database so that's that. So your good self and @bender etc - apologies but your profiles got nuked as well (as did my own but easily recreated).
Are the weird errors gone at least? 😅
make clean
. Why I originally had them in the git directory is anyone's guess. Anyway it blew away those files including the database so that's that. So your good self and @bender etc - apologies but your profiles got nuked as well (as did my own but easily recreated).
@eldersnake@we.loveprivacy.club Hold up wait… You effectively now have a fresh new pod with only yourself? 🤣 Ooops!
Better yet, I’ll write some code to do this to make it a whole lot easier to do. Should be ready by tonight
@eldersnake@we.loveprivacy.club There is. I’ll document this tonight and send it your way! 🤞
@eldersnake@we.loveprivacy.club received
@slashdot@feeds.twtxt.net so the Ukraine had to land mines in 1324? 🧐
@shreyan@twtxt.net stressed 😅 how about you?
I’m finding myself more and more now using the web app on mobile 🤔🧐
^n
, then @
and then bender<TAB>
and the rest of this twt, finally ^ENTER
)
@bender@twtxt.net Also thanks 🙏
^n
, then @
and then bender<TAB>
and the rest of this twt, finally ^ENTER
)
@bender@twtxt.net If you think the keyboard shortcuts should be by default something else, LMK! Otherwise if interest levels pick up again for yarnd
and there’s enough interest, it could become a user preference.
^n
, then @
and then bender<TAB>
and the rest of this twt, finally ^ENTER
)
Keyboard shortcuts:
^n
(Ctrl+n) – Compose new Twt
Esc
(Escape) – Close the composer
^t
(Ctrl+t) – Refresh or navigate to Timeline
^m
(Ctrl+m) – Refresh or navigate to Mentions
^d
(Ctrl+d) – Refresh or navigate to Discover
There are shortcuts for Feeds, Settings and Profile too (similiarly))
@bender@twtxt.net Btw how are you finding the new and improved UX at all? 🤔 (this Twt was authored by presing ^n
, then @
and then bender<TAB>
and the rest of this twt, finally ^ENTER
)
@bender@twtxt.net Yeah I’m just about done! ✔️
@bender@twtxt.net As am I. @eldersnake@we.loveprivacy.club when you are able, I’d like to take a more active role in helping you get to the bottom of this. SSH, get in there, whatever it takes. I’m a bit perplexed by what’s going on for you 😱
This is fixed, improved, tested and rolling out shortly, Including dynamically reflecting the theme too!
Which is actually only 3 commits behind 😅
@bender@twtxt.net Looks like it’s running 1977cb18 2024-06-17T22:54:51+00:00
@bender@twtxt.net Looks like it’s running 1977cb18 2024-06-17T22:54:51Z
@bender@twtxt.net Working on fixing that now actually 😅 I have to exchange 3 key pieces of information in every request, title, navigation and preference. I’m just refactoring the templating now so I don’t have to duplicate this everywhere, just do it once.
Fixed and being rolled out. Forgot to actually check the preference 🤦♂️
@eldersnake@we.loveprivacy.club You around this late evening at all? 🤔 I want to fix this for you!
@eldersnake@we.loveprivacy.club Yes! It’s just a flag and otherwise is stupidly simple.
@eldersnake@we.loveprivacy.club Oh that is super weird 🤔 I am admin on my pod and I always test locally with the admin account hmmm 🧐
@eldersnake@we.loveprivacy.club I can’t think of why that might be? The bloody URL of feeds is always a problem and changing the Base IRL of the pod is rather problematic that I never solved. But otherwise hmmm I’m not sure!
@eldersnake@we.loveprivacy.club Okay so maybe not a browser thing - just didn’t try myself (although I regularly use Chrome and Mobile Safari)
One thing I haven’t thought to rule out is the browser itself. When I tried to reproduce, I was using chrome and I wasn’t able to reproduce what you were saying from the client perspective.
@eldersnake@we.loveprivacy.club Can I see an excerpt of the NGINX logs?
@eldersnake@we.loveprivacy.club It’s more likely I’ve done something silly that I can’t pin point 🤣
@bender@twtxt.net Thanks! I’ll check that out later tonight 🤞
@eldersnake@we.loveprivacy.club Cool! And yeah that’s right!
@bender@twtxt.net Hmmmm I’m not sure about this… 🧐 Does anyone have any other opinions that know this web/session security better than me?
yarn.example.com
, but have the handles (or whatever we call twtxt's @usernames
) be @username@example.com
?
@bender@twtxt.net We need to design what this will look like and the mechanisms 🧐
textarea
, as if I was going to post something. Kind of annoying having that on-focus first and above all.
@bender@twtxt.net Merged 👌
@bender@twtxt.net As soon as @eldersnake@we.loveprivacy.club’s issue is figured out I think? 🧐
2199cedf12
. Granted, it is not the full browsing experience I always dreamed for Yarn but, still, a huge leap forward.
@bender@twtxt.net Oh thanks! 🙏 I don’t even remember what that commit was 🤣
@eldersnake@we.loveprivacy.club did you happen to customize the theme at all?
textarea
, as if I was going to post something. Kind of annoying having that on-focus first and above all.
textarea
, as if I was going to post something. Kind of annoying having that on-focus first and above all.
textarea
, as if I was going to post something. Kind of annoying having that on-focus first and above all.
Do you the /conv
view? Tapping on a Yarn?
textarea
, as if I was going to post something. Kind of annoying having that on-focus first and above all.
@bender@twtxt.net Isn’t the “New Post” box closed by default?
yarn.example.com
, but have the handles (or whatever we call twtxt's @usernames
) be @username@example.com
?
@bender@twtxt.net Ahh I see 🧐 What are you proposing here? 🤔
yarn.example.com
, but have the handles (or whatever we call twtxt's @usernames
) be @username@example.com
?
@bender@twtxt.net Oh do you mean visually in the UI?
@bender@twtxt.net Both are already a thing. Hit “Remember me” which persists your sessions for days. Text you entered should be preserved, but now that you mention it, maybe only if you navigate away hmmm lemme check that…
yarn.example.com
, but have the handles (or whatever we call twtxt's @usernames
) be @username@example.com
?
@bender@twtxt.net Yup I can. But as I said, only via DNS delegation. Hmm are you thinking something else?
yarn.example.com
, but have the handles (or whatever we call twtxt's @usernames
) be @username@example.com
?
@bender@twtxt.net Yes. yarnd
fully supports WebFinger just like ActivityPub and Mastodon do. So @user@domain
mentions are actually looked up.
@bender@twtxt.net phew 😅 I mean I did quite some extensive testing locally too 🤣
@eldersnake@we.loveprivacy.club Hey! 👋 I’m not able to reproduce what you’re seeing on your pod. Did you recently update? 🤔
So far so good. A lot of the event handlers I was used to all seem to be working. So that’s a good sign 🪧
@bender@twtxt.net I’ve managed to fix this locally. Rolling out an update to my pod now…
@aelaraji@aelaraji.com Haha 🤣
@eldersnake@twtxt.net I will jump on your pod later this evening and do some debugging 🤞
@bender@twtxt.net Ahh perfect bug report!
@bender@twtxt.net Thanks!
Hypermedia Systems – Edit: I should have said, I plan to read this book…
Well I’m off to bed. I’ve fixed as many broken things as I could find. All in the name of improvements eh? 😅 Here’s what I am aware of that’s still non-functional/broken:
- Link Verification
- Stripping Tracking Params
Pretty much everything else should be working. If something isn’t quite right though, please help me out with a concise repro 🙏
Testing Ctrl+Enter
to post…
Problem is I’m not able to reproduce this so easily hmmm
This was an example of where I thought the same as you @bender@twtxt.net
@bender@twtxt.net hmm indeed
Hmm seems to be okay. What’s not working? @xuu@txt.sour.is ?
@bender@twtxt.net Testing mentions… via the auto-complete…
I just finished fixing the Lightbox media feature that makes clicking on media open them in a modal. Link verification and stripping are broken as well and commented out (on the list)
Like Ctrl+Enter
used to work as a keyboard shortcut to post, but that’s broken. Fixing that next 🤣
@bender@twtxt.net Hmm I thought so too at first, but I hard-refreshed to force any browser cached Javascript to be reloaded and I can’t seem to reproduce any funkiness (so far) – But still fixing bugs I find…