this post was submitted on 01 Sep 2023
7 points (100.0% liked)

/kbin meta

4 readers
1 users here now

Magazine dedicated to discussions about the kbin itself. Provide feedback, ask questions, suggest improvements, and engage in conversations related to the platform organization, policies, features, and community dynamics. ---- * Roadmap 2023 * m/kbinDevlog * m/kbinDesign

founded 1 year ago
 

So funny thing about #kbin. I post a photo thread. I go to my profile and see the thread. I click on the image preview icon. I immediately get sent to https://kbin.social/u/undefined. Not only is Mr. Undefined a real user, hello @undefined, but somehow my image now directs to his profile.

As I dig into Firefox dev tools to find out why, I see that uBlock Origin has blocked the request for my image. But that's odd, I have no specific blocking rules for kbin, and kbin.social doesn't run ads. What's up?

So it turns out my image got uploaded to the following URL: https://media.kbin.social/media/ad/b2/adb203028331eada7f99f2b4547cbc0a7efc0ba4e203a71d9d193c02d38aa4f1.jpg

.../media/ad/... That's what uBlock was upset about. So by blocking that request, the target of the AJAX fetch is... undefined. Hence my trip to a random user's profile. XD

#kbinMeta

top 7 comments
sorted by: hot top controversial new old
[–] HarkMahlberg@kbin.social 4 points 1 year ago

So if you're a kbin user and for some ungodly reason you find yourself on Mr. Undefined's page after previewing an image, you may want to add the following rules to your ublock origin list.

[–] e569668@fedia.io 1 points 1 year ago (1 children)

@HarkMahlberg I would consider adding a bug for this to the issue tracker as it seems like a gotcha https://codeberg.org/Kbin/kbin-core/issues

[–] HarkMahlberg@kbin.social 2 points 1 year ago* (last edited 1 year ago) (1 children)

@e569668 I was thinking about it, but since it had to do with software I was running personally I figured it isn't really kbin's fault. Then again, a simple solution would be to blacklist "ad" as an index folder for uploaded media. I'll toss in an issue and y'all can discuss.

1085

[–] e569668@fedia.io 2 points 1 year ago (2 children)

@HarkMahlberg I assumed it was a default ublock rule and not one you added so I imagine a lot of people might run into this. Well, "a lot" depending on how often a filename's sha256 hash starts with ad. At the very least it's probably good to know about it, even if nothing is changed. But perhaps there's enough reason to use a different system to name image caches like the name generators a lot of image hosters seem to use. I guess it's in the devs hands now :) thanks for sharing it

[–] HarkMahlberg@kbin.social 2 points 1 year ago* (last edited 1 year ago)

@e569668 Oh, I meant to say that my running ublock origin at all was personal, and not everyone is going to run ublock origin. But to clarify, the rule that triggered the bug came from a default ublock list: https://easylist.to/.

[–] Teppic@kbin.social 2 points 1 year ago (1 children)

@e569668
@HarkMahlberg
I think a bug report to ublock would be more sensible. I guess ultimately this creates a question about at what point kbin should code around a somebody else's bug (which may only be temporary)... I don't know the answer to that one.

[–] e569668@fedia.io 1 points 1 year ago

@Teppic
@HarkMahlberg

I don't disagree that could be tried, but I just doubt they would change that rule just for kbin, compared to kbin changing it from /media/ to anything else like /media/hash/ and avoiding the problem. I have to imagine most users of the fediverse use ublock and use the default lists