3 ms·
I've seen many things in my 10+ years of coding, Here are some favourites: * No authentication check on any page after login page. (You could type in any URL i
by vijayaggarwal 12y ago
I've seen many things in my 10+ years of coding, Here are some favourites:
* No authentication check on any page after login page. (You could type in any URL in browser address bar and gain access).
* GET request updating home page related content in database. (A few of these GET request was picked up by Alexa bot and we hard our home page content change randomly for many days. We had a real hard time troubleshooting this one).
* Use of mysql_query() in PHP. (Deprecated mote than 10 years ago. Opens doors for SQL injection).
* Use of loop variables i,j,k,l,m for 5-level nested loop. (Too error prone and difficult to read).
* Unit testing applied to a highly monolithic code. (The hacks for isolating code units produced more garbage than the code itself). It was a legacy code and the management blindly ordered writing of unit tests when a few bugs were caught in production.
- shoo 12y ago> Unit testing applied to a highly monolithic code Do you (or indeed anyone else reading) have suggestions for getting other forms of testing in place around legacy monolithic code? Perhaps this is a fairly ill-posed question without more context.
- vijayaggarwal 12y agoYou can still do Integration Testing with the system as a whole, although it is supposed to be done after Unit Testing. The disadvantage due to absence of Unit Testing will be that it will be difficult it isolate bugs found during Integration Testing. For websites, we use Selenium all the time.
- robflynn 12y agoI have seen some similar code. After authentication, a parameter was passed into the URL. Basically, if you had that token, you were logged in. Some user posted a link to their page on some site and included that token. Later, the user complained about all of their photos constantly being deleted. Photo deletes were GET-based and did not have no-follow. Google eventually indexed their logged-in link and was happily deleting all of their photos daily. Fun times tracking that one down. (It was a code base that I inherited.)