Why I’m seeing pornhub instead of my website?

2 мин. на чтение

Couple days ago my hosting provider sent me alert about x5 overload to CPU in comparing with allowed. Investigation shows that there dozens of websites around the World which are uses typeahead.js library directly from my website. Sample code:

<script src="//netsh.pp.ua/upwork-demo/1/js/typeahead.js"></script>

I did some safe steps to alert developers (or owwwners) of those websites about this issue but 99% ignored warnings. I’m starting from console.log(), then alert() but nothing changed. So, lats step was replace code of Typeahead.js library on my website with simple redirect to pornhub.com. It was hard but effective.

Feeling butthurt? Me too. Following my server logs file, more than 150 only commercial websites uses my hosting for years as [itg-tooltip href=”http://tooltip” tooltip-content=”<p>Content Delivery Network</p>”]CDN[/itg-tooltip] service and didn’t pay for that even penny. Total count of all websites is over 500. Basically, prices for CDN start from 4$ per month. So, every year I have lost approximately 150 x 4 x 12 = 7200$

How to fix it?

It’s really easy! Just replace source of typeahead.js file from my website to any CDN or store typeahead script on your hosting or server directly.

Keep in mind that Typeahead is a common and not secret library and there is no reason why you should use my website as a script storage. Please follow official page for more information about Typeahead library (written by Twitter Inc. by the way).

If you really lazzy to google, please use this link to get proper CDN https://cdnjs.com/libraries/jquery-typeahead

How to avoid similar cases in future?

If you are project owner

Every time while hiring junior developers for 5-7$ hourly rate keep in mind that you got completely what you are paying for.

If you are web developer

If you are a web developer (even with 5-7$ hourly rate) please thinking twice before copy/paste code from Stackoverflow like here or here to production projects. You have seeing unusual domain as script source and don’t care about that?

Ihor Chyshkala

Full Stack Software Engineer PHP ♥️JS
IT Pro blogger

Rate author
Ihor Chyshkala author's blog
Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Nope

    Why porhub you idiot. Google.com or a page on your site to this post would have been sufficient

    1. Ihor Chyshkala author

      Well, I don’t see any problem with PH compared with stupid ‘copy-paste’ code from articles – porn code.