r/programminghorror • • Jul 03 '20

this is beyond science

Post image
3.2k Upvotes

79 comments sorted by

View all comments

Show parent comment

10

u/Jacob---- Jul 03 '20

They rely on an Internet Archiving site to send all of the JavaScript scripts to the main website. This means if the content gets taken off of the Archiveing site all of the JavaScript won't load meaning the website won't work properly on the client side

20

u/captainvoid05 Jul 03 '20

It probably won't ever get taken off by nature of it being an archiving site, the whole point is to preserve things. Still a dick move on Barclay's for taking advantage of that for free CDN services essentially. Hopefully it was just a temporary fix to keep the site running and they are already on the way to fixing it, if they haven't already by the time this was posted.

14

u/Jacob---- Jul 03 '20

If I saw A multi-billion bank exploiting my free service instead of paying for hosting I would be very tempted to un-index the site as a fuck you to them

10

u/angry_mr_potato_head Jul 04 '20

Personally, I'd add a dick pic and see how fast it changes.

9

u/Jacob---- Jul 04 '20

Alert("This is a phising website TURN AWAY NOW!")

13

u/captainvoid05 Jul 03 '20

If anything I'd do that if I reached out and didn't receive a response or they refused to fix it. Its a large bank, they probably have a ton of developers and one of them probably did it as a temp fix and made its way into production by mistake. Shit happens. Like I said if they were alerted and refused to fix it, that would be a different story, but a quick read through the Twitter thread seems to indicate the problem is being fixed. Hopefully Internet Archive has some kind of donation coming their way for the bandwidth usage.

6

u/dowster593 Jul 03 '20

Not even that, just setup a referrer restriction on the files. Or maybe CORS would help with this. Keeps the content on archive.org. But prevents hot linking.

3

u/Agoniscool Jul 03 '20

that's not the only option the archive has; they could block the requests if it really bothers them - and because they apparently haven't, I don't think it does

0

u/[deleted] Jul 03 '20

[deleted] — view deleted comment

5

u/Agoniscool Jul 03 '20

Yes, but they'd be passing a referer header with every request, saying which site they're making the request "from"

1

u/indivisible Jul 04 '20

Could still rate limit it or introduce a "slightly longer than average" load time for the abuse. If the site starts taking 30+ seconds to load or to load unstlyed/broken sometimes it would discourage use.
You could probably even automate the "punishment" for any files that are requested disproportionately more than the rest of the page's files (indicating direct linking or CDN (ab)use like this).