Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Grace Baiting posted:

+1 on this, it is especially easily reproducible on a page with a quote of another post on that same page (you can just "mark as last read" somewhere down the page and then tap on the same-page quote tag; repeat as often as desired!)

Thanks for this, and the original report. That’ll help figure it out.

Adbot
ADBOT LOVES YOU

MarcusSA
Sep 23, 2007

Subjunctive posted:

Thanks for this, and the original report. That’ll help figure it out.

I posted about this issue in 2021 :argh:

Grace Baiting
Jul 20, 2012

Audi famam illius;
Cucurrit quaeque
Tetigit destruens.



MarcusSA posted:

I posted about this issue in 2021 :argh:

skill issue  :grin::meowth: :frogc00l:

DerekSmartymans
Feb 14, 2005

The
Copacetic
Ascetic
Good girl testing for me (iPhone 13):



Edit:

It worked! Hallelujah!

Edit 2.0 (testing my iPad in the same post an hour later) :stat::wal::

DerekSmartymans fucked around with this message at 02:02 on Mar 21, 2024

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
Share sheet is excellent! Just what I was looking for in the iOS apps thread!

webmeister
Jan 31, 2007

The answer is, mate, because I want to do you slowly. There has to be a bit of sport in this for all of us. In the psychological battle stakes, we are stripped down and ready to go. I want to see those ashen-faced performances; I want more of them. I want to be encouraged. I want to see you squirm.
Woah, this is life changing

Data Graham
Dec 28, 2009

📈📊🍪😋



I must be even dumber than I thought. I have no idea how this shortcut works.

I installed the shortcut, and it said you activate it by saying "Siri, Postimage", and that it appears in the share sheet. I opened an image and opened the share sheet, and there's nothing about Postimage in there; so I said "Siri, Postimage" and Siri said "I can only send screenshots from there". And then a second later said "Who do you want to message?"

:confused:

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
It's a share sheet extension, so you wouldn't use it with Siri. Find a picture of a good catte and share the picture and choose the shortcut. You'll need to accept/allow url access the first time you use it but after that it should stop asking.

Data Graham
Dec 28, 2009

📈📊🍪😋



"Find a picture" meaning, like, in Photos? Or on the web or the forums in an app etc?

When I pull up the share sheet there is nothing about Postimage in it. Is it something I have to enable manually or something? I clicked on Edit Actions and there's nothing in there either.

Data Graham
Dec 28, 2009

📈📊🍪😋



Oh wait, I got it. I had to go into the actual Shortcuts app and click on the Postimage one and go through all its permissions dialogs, and then it showed up in other apps' share sheets.

:woop:

Tenkaris
Feb 10, 2006

I would really prefer if you would be quiet.

Data Graham posted:

"Find a picture" meaning, like, in Photos? Or on the web or the forums in an app etc?

When I pull up the share sheet there is nothing about Postimage in it. Is it something I have to enable manually or something? I clicked on Edit Actions and there's nothing in there either.

Go to your shortcuts, select the ... on the post image shortcut, press the i in a circle at the bottom

Warbird
May 23, 2012

America's Favorite Dumbass

Test:



Also you all should play this, it whips rear end.

Edit: sick. Thanks for sharing. I need to see if I can rejigger it too as to a specific account/key. Nothing against OP but I like to keep my stuff where it can have an eye kept on it. Maybe I should self host something.

ChickenOfTomorrow
Nov 11, 2012

god damn it, you've got to be kind

I know the fix is to hold longer, longer than you think, no even longer than that; but I really hope the image long-press bug gets fixed soon :(

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

ChickenOfTomorrow posted:

I know the fix is to hold longer, longer than you think, no even longer than that; but I really hope the image long-press bug gets fixed soon :(

I was going to try to work on that this weekend but instead got sick this week so I have to catch up on work first. Maybe if I’m a good boy and get my writing done…

spankmeister
Jun 15, 2008






Warbird posted:

Test:



Also you all should play this, it whips rear end.

Edit: sick. Thanks for sharing. I need to see if I can rejigger it too as to a specific account/key. Nothing against OP but I like to keep my stuff where it can have an eye kept on it. Maybe I should self host something.

Is that like an emulator or summat? e: it's a switch emulator, no need to derail the thread, sorry! :shobon:

spankmeister fucked around with this message at 19:33 on Mar 22, 2024

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

Warbird posted:

Edit: sick. Thanks for sharing. I need to see if I can rejigger it too as to a specific account/key. Nothing against OP but I like to keep my stuff where it can have an eye kept on it. Maybe I should self host something.

Register an account at postimages and then visit this url:


You'll get your own api key and you can just replace the api key in the shortcut. I haven't tried this but I imagine this will associate your uploads to your own account.

No offense taken. The existing api key is the one you see when you right click the website and show source.

E: never mind, this doesn't work

Boris Galerkin fucked around with this message at 21:26 on Mar 22, 2024

`Nemesis
Dec 30, 2000

railroad graffiti

for some unknown reason i still get the no valid url error with this, what am i doing wrong?

fartknocker
Oct 28, 2012


Damn it, this always happens. I think I'm gonna score, and then I never score. It's not fair.



Wedge Regret

Boris Galerkin posted:

You'll get your own api key and you can just replace the api key in the shortcut. I haven't tried this but I imagine this will associate your uploads to your own account.

No offense taken. The existing api key is the one you see when you right click the website and show source.

Where would you put the API key in the shortcut?

When I go to view the shortcut, I see this:



I know you can expand some stuff, like if I click the arrow next to the postimages url at the top, I see this:



But I’m not sure where the API thing would go. Just want to make sure, since I just copied the one that was posted before, so I don’t want to edit the wrong thing and break it…

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

it would go in “token”

I reached out to postimages, will see what they say. worst case we make people register an account and provide a token themselves through some UI, but that’s something we’d want to be able to keep across cache clearing I think

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

`Nemesis posted:

for some unknown reason i still get the no valid url error with this, what am i doing wrong?

I'm not sure, but my two guesses are (1) shortcut permission error and (2) you tried to upload an unsupported format so the upload failed, and if that happened the second "get url" in the shortcut (you can see it in the picture above) won't be valid.

For (1) try running the shortcut directly from the shortcuts app and "always allow" permission to access the two(?) postimages urls that get called.

Maybe also try going into Settings > Shortcuts > Advanced > ✅ Allow Sharing Large Amounts of Data. Maybe the picture of your catte was too big.

Also I hope all this chat about this shortcut ITT isn't upsetting any of you guys working on the app. I saw a few posts on the page before I posted the shortcut complaining about the imgur shortcut being broken so I just posted it here first.

fartknocker
Oct 28, 2012


Damn it, this always happens. I think I'm gonna score, and then I never score. It's not fair.



Wedge Regret

Subjunctive posted:

it would go in “token”

I reached out to postimages, will see what they say. worst case we make people register an account and provide a token themselves through some UI, but that’s something we’d want to be able to keep across cache clearing I think

I tried replacing the "token" with the API generated from the above link, and now it gives me an error that says "No URL Specified: Make sure to pass a valid URL to the Get Contents of URL action". I didn't change anything else, just pasted the API in the token section.

Edit: Deleted and reinstalled the shortcut, testing again to make sure it’s working

fartknocker fucked around with this message at 21:22 on Mar 22, 2024

Tenkaris
Feb 10, 2006

I would really prefer if you would be quiet.
Same as above, putting it in the token spot broke it

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
Oops, yeah, I see the following error:

code:
{"status":"error","error":"Forbidden"}
Sorry, looks like using your own api token is more complicated than simply changing the tokens. I suspect that long string of a... needs to be "correct" for the token as well. How to get that value, I have no idea.

E: vvv just wanna be clear, the token in the shortcut isn't mine; it's the one baked into the post images website and you can verify it by viewing the source code on a computer and searching for that token. The website can at any moment change the api token and this shortcut will break. But they haven't changed it as far back as 2018 I believe. vvv

Boris Galerkin fucked around with this message at 21:33 on Mar 22, 2024

Tenkaris
Feb 10, 2006

I would really prefer if you would be quiet.

Boris Galerkin posted:

Oops, yeah, I see the following error:

code:
{"status":"error","error":"Forbidden"}
Sorry, looks like using your own api token is more complicated than simply changing the tokens. I suspect that long string of a... needs to be "correct" for the token as well. How to get that value, I have no idea.

Interesting, well i guess we are using your token for now :D

Also for the file format concerns you could use a convert step in the shortcut like this:

Tenkaris fucked around with this message at 21:31 on Mar 22, 2024

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Boris Galerkin posted:

Also I hope all this chat about this shortcut ITT isn't upsetting any of you guys working on the app. I saw a few posts on the page before I posted the shortcut complaining about the imgur shortcut being broken so I just posted it here first.

Nah, this is helpful and relevant. Thanks for the shortcut, I hope we don’t need it for long!

`Nemesis
Dec 30, 2000

railroad graffiti

Boris Galerkin posted:

I'm not sure, but my two guesses are (1) shortcut permission error and (2) you tried to upload an unsupported format so the upload failed, and if that happened the second "get url" in the shortcut (you can see it in the picture above) won't be valid.

For (1) try running the shortcut directly from the shortcuts app and "always allow" permission to access the two(?) postimages urls that get called.

Maybe also try going into Settings > Shortcuts > Advanced > ✅ Allow Sharing Large Amounts of Data. Maybe the picture of your catte was too big.

Also I hope all this chat about this shortcut ITT isn't upsetting any of you guys working on the app. I saw a few posts on the page before I posted the shortcut complaining about the imgur shortcut being broken so I just posted it here first.

thank you. i found it works until i change my api token. will mess around with it more.

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

`Nemesis posted:

thank you. i found it works until i change my api token. will mess around with it more.

Yeah, I think the upload_session string needs to change too. Just reading the GitHub thread I linked before, this post specifically says:

quote:

the session is a random generated string in the script

I'm not sure where they got the aaaa...aaa from either. But it's probably a default anonymous session for that public facing api token.

`Nemesis
Dec 30, 2000

railroad graffiti

Boris Galerkin posted:

Yeah, I think the upload_session string needs to change too. Just reading the GitHub thread I linked before, this post specifically says:

I'm not sure where they got the aaaa...aaa from either. But it's probably a default anonymous session for that public facing api token.

So is everyone just using the anon token, or what steps am i missing to use my own token?

thanks again for the help

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

`Nemesis posted:

So is everyone just using the anon token, or what steps am i missing to use my own token?

thanks again for the help

Correct. The api token saved in the shortcut is the same api token that is visible on the postimages website when you view the source code. So it's not my api token, it's the one everyone uses when they upload anything to the website directly.

Just hopped on a computer to check this out more.

Here is how the upload_session string is generated:

code:
function rand_string(e) {
    for (var t = "", i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", n = 0; n < e; n++)
        t += i.charAt(Math.floor(Math.random() * i.length));
    return t
}

var upload_session = rand_string(32);
Seems straightforward enough, but adding that + a custom api key doesn't work. I don't know how to fix this.

spankmeister
Jun 15, 2008






I'll take a look later today, there's probably a proper API endpoint that you can call with just the token, or you have to use the token to authenticate first to get a session cookie and then you can post the image.

e: It doesn't look like they have documented their API anywhere, and the forums plugins look to be just including some javascript from mod.postimage.org that has largely the same javascript as from the main website.
Looking into the windows app now.

e2: Well, it's no fun looking at a 10 year old Qt app in IDA, but the network traffic is plain HTTP at least :nsa:

spankmeister fucked around with this message at 12:26 on Mar 23, 2024

spankmeister
Jun 15, 2008






Looked into the windows app a bit and it actually uses api.postimages.org. The good news is that it looks like you're actually able to use your API key in the app, but the bad news is that it looks like the API is really only intended for the windows app since it requires you to send the version of the app you're using, and will tell you to download the latest version if you don't.

The request is sent off as x-www-form-urlencoded, with the image file first being zlib compressed, base64 encoded and then url encoded.
There are some more magic parameters like o and m that I don't fully understand but seem to be analogous to a session token or something like that.

As far as everyone using their own API key, I don't think you really have to, since the public apps and plugins all have the same public api key baked in. It's more convenient to have them in your own account but it doesn't look to be strictly necessary.

The API seems to be uh, quite brittle as well, it's really easy to get it to error out or time out so I'm not sure we want to be using it.

spankmeister fucked around with this message at 13:59 on Mar 23, 2024

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
That's awesome. Thanks! So I take this to mean that my shortcut is probably fine, because if they invalidate the key then it invalidates all of their plugins that they've shipped.

By the way, here is a short 16 step guide for using Imgur on Android to post pictures:

Microplastics posted:

Your post spurred me to look into this a little closer. Turns out, it's a toss-up as to whether hidden images appear on the "hidden" tab or not, so "all" is your best bet.

So here is my tried and tested 16-tap guide for the imgur app

1. Open app
2. Tap upload button
3. Tap image(s)
4. Tap Next
5. Tap Post
6. Tap user account button
7. Tap "Public"
8. Tap "All"
9. Tap the freshly uploaded image
10. Tap it again
11. Tap the share button
12. Tap copy next to the URL
13. Switch to awful where your post is in draft
14. Tap BB button
15. Tap Insert Image
16. Tap OK

Voila

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
Perhaps an alternative to baking in postimages support into Awful.app would be to just add a link somewhere in settings to the shortcut where it's more visible. Then you wouldn't have to provide support if it breaks because, you know, it's not Awful.app it's "just a shortcut". I have no idea how long these shortcuts share links last or if there's a better way to support/link to a shortcut. I'm also fine with someone taking the shortcut and repurposing it with better error handling and stripping metadata and calling it the official unofficial awful image uploader shortcut without giving me any credit (I literally copied what the people on that GitHub issues posted anyway).

spankmeister
Jun 15, 2008






Boris Galerkin posted:

That's awesome. Thanks! So I take this to mean that my shortcut is probably fine, because if they invalidate the key then it invalidates all of their plugins that they've shipped.

The windows app uses a different default api key, but the "latest" version of the windows app is from 2013, so that key has been in use for over a decade. :shrug:

As far as the forums plugins go:

code:
projects/postimage/plugins$ for i in *.js; do printf "%-15s" $i; js-beautify $i | grep -w token; done
fluxbb.js                      formData.append("token", "61aa06d6116f7331ad7b2ba9c7fb707ec9b182e8");
mybb.js                        formData.append("token", "61aa06d6116f7331ad7b2ba9c7fb707ec9b182e8");
phpbb3.js                      formData.append("token", "61aa06d6116f7331ad7b2ba9c7fb707ec9b182e8");
punbb.js                       formData.append("token", "61aa06d6116f7331ad7b2ba9c7fb707ec9b182e8");
zetaboards.js                  formData.append("token", "61aa06d6116f7331ad7b2ba9c7fb707ec9b182e8");
So yeah, I think we're good using that. Might want to change it depending on their reply to Subjunctive.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

huh, indeed. I’m very curious as to what the purpose of that API key even is at this point, since it doesn’t expire or seem revocable without destroying everything

are people supposed to install their own token when using the forum integrations? very weird

Data Graham
Dec 28, 2009

📈📊🍪😋



lol @ all this extremely well designed API and impeccable secrets discipline on their part

spankmeister
Jun 15, 2008






Subjunctive posted:

huh, indeed. I’m very curious as to what the purpose of that API key even is at this point, since it doesn’t expire or seem revocable without destroying everything

are people supposed to install their own token when using the forum integrations? very weird

So the thing is, you can't do that! All that the various plugins do is to include some javascript from postimage's domain. And the API key is hardcoded in that javascript.
If you wanted to replace it with your own, you would have to re-host the js yourself, or do some funky javascript trickery to override the variable.

For example, this is all of the php code for the mybb plugin, minus the boilerplate:



(Cloudflare threw a fit when I tried to include the php code in here, so a screenshot will have to suffice.)

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I’m getting a bad feeling about this service, hmm. I wonder if it’s actually better than putting Imgur back…

spankmeister
Jun 15, 2008






Subjunctive posted:

I’m getting a bad feeling about this service, hmm. I wonder if it’s actually better than putting Imgur back…

Yes, this entire outfit is giving me the hacker heebie jeebies. I noticed a couple more problems which I wont discuss on an open forum for search engines to crawl, but what I saw wasn't exactly confidence inspiring. Mostly it looks like it has been abandoned 10 years ago.

Adbot
ADBOT LOVES YOU

Midjack
Dec 24, 2007



Data Graham posted:

lol @ all this extremely well designed API and impeccable secrets discipline on their part

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply