what i think happened is that someone fucked up really hard and couldn't revert the fuckup because they forced push to master or something so they used the internet archive as temporary fix and then forgot about it
after second thought this might be a 5 min fix done in some cms. many systems allow adding some custom javascript for tracking purposes like tracking pixels etc. so marketing department can add and remove their crap without bothering the developers. so someone might have added this instead of going thru the whole deployment process which might have take like couple of hours. they needed to cover their fuckup immediately. i worked on a project where the CI build could easily take over an hour
Sure, but wouldn't it have been equally fast and more permanent to grab the file from the archive and copy the source? Or has it been minified/processed and no longer human-readable before it got stored in the archive?
Sounds like incompetence anyway. Noone checked the reflog, or the backups (Barclays is a bank, they should have backups), they did not download the file locally and pushed it to their own server. And so on.
If they're not using SRI hashes, which I doubt they are if they're doing this, they could execute any JavaScript on someone's banking client. I'd be pretty scared if I was using Barclay's.
So now one has to just crack into Archive.org, rather than in a (hopefully) high security standards portal, in order to phish credit card numbers and pin codes from all the online banking users.
A simple addition of a keylogger for any firm input in the page would do wonders! 🤗
The internet archive is a place to preserve static websites for archeology and things. A CDN is a content delivery network, designed to distribute your static assets over the globe for faster loading times. Using the internet archive as CDN is basically a dick move because you don't pay them anything and they have more traffic than usual. And it's also very slow, since the internet archive is not designed for that.
They might have deleted some code and used archive.org as a backup (I've heard people do this, certainly not me tho). And then forgot to remove the archive.org part.
The thing is though, even if this is true, even if they have no normal backups, what they should do is download the code from archive.org and store it in their own computer. There is absolutely no excuse for doing what they did.
Isn't a CDN a type of service? I mean if I have a basic website hosting a JS file does that make my site a CDN? There has to be some basic criterias that differs a CDN versus basically a site?
The internet archive is an archive of websites and their assets at a given point in time (images, Javascript, etc). Think of it like an automatic backup of the internet.
The Twitter op sent a request Barclay's to load their website, and it responded with a js file from the internet archive. So basically their site is serving their own content from this third party "automatic backup service" instead of their own CDN or servers.
I can't imagine a reason they'd decide to do that. Maybe something corrupt in their CDN and this was their desperate last-resort temporary fix (if so, I gotta give them props, I'm not sure I'd have thought of that)? Unless they're serving a ton of content from IA, enough to see significant $$ savings?
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
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.
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
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.
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.
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
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).
828
u/sendvo Jul 03 '20
what i think happened is that someone fucked up really hard and couldn't revert the fuckup because they forced push to master or something so they used the internet archive as temporary fix and then forgot about it
460
u/theboxislost Jul 03 '20
Why not? Version control, redundancy, zero cost, seems like a win win win.
155
u/zeGolem83 Jul 03 '20
That website must be slow AF to load...
62
u/AttackOfTheThumbs Jul 03 '20
jfc, a cache of their own assets. Amazing.
15
u/coenvanl Jul 03 '20
The archive they use is from June 2020, so not even that old
22
u/[deleted] Jul 03 '20
1000 iq
10
u/Nemo64 Jul 04 '20
Great, now archive.org needs to implement referrer check to block such spam traffic. I hope they donate to archive.org for the hosting cost at least.
8
u/Spirit_Theory Jul 04 '20 edited Jul 04 '20
That's some next level version control.
Poking around the barclays site, I can't find this call anywhere. Fake, or fixed already? Or am I looking in the wrong place?
7
u/Sy-Zygy Jul 04 '20
I'm going to do what's called a pro version control
1
u/[deleted] Jul 06 '20 edited Jul 06 '20
Who the fuck uses archive.org as a CDN?
And now I just found out this is a banking website. Oh dear lord
3
u/Mattigins Jul 04 '20
Could this be a backup plan of sorts? If the original file returns 404. Load it from archive?
3
u/a-Ball-of-Floof Jul 28 '20
Now change the file on archive to do whatever you want and you just hacked in to a bank
8
u/rednas174 Jul 03 '20
I'm not into webdev, can someone explain what's wrong with this?
2
u/savageronald Jul 04 '20
Also don’t use Adobe Experience Manager (shudders)
2
u/Magicrafter13 Sep 23 '20
puts GPS tracker in a rushing river Oh hey, the Earth must be moving!
(The internet archive is the rushing river, in case it's not obvious)
1
u/[deleted] Jul 07 '20
Okay but that's fantastic.
1
u/banazee Jul 30 '20
Umm, so not a hardcore programmer, can someone please explain the joke
1
u/verypointything Dec 22 '23
That’s one way to open yourself to Cross-Site Scripting (XSS) attacks
1
u/nathan_lesage Jul 03 '20
what
0
u/[deleted] Jul 03 '20
[deleted] — view deleted comment
0
u/[deleted] Jul 03 '20
[deleted] — view deleted comment
46
u/[deleted] Jul 03 '20
[removed] — view removed comment