4 ms·
If I recall correctly the code looked something like this: <?php if (!admin()) echo "<script>window.location = '/signin';</script>"; delete_bid($_GET['bid
by joshfraser 13y ago
If I recall correctly the code looked something like this:
<?php
if (!admin())
echo "<script>window.location = '/signin';</script>";
delete_bid($_GET['bid_id']);
?>
- mbenjaminsmith 13y agoWhen you think about it it's actually pretty elegant -- if your purpose is to write something that appears to work but will do the worst possible thing when crawled.
- sigkill 13y agoSomething like the underhanded C contest then?
- xerophtye 13y agoa simple 'else' would have at least stopped the deleting part :/
- bdg 13y agoThis could have been written in the mindset that JavaScript and PHP ran at the same time. Lots of people still believe that.
- StavrosK 13y agoI don't understand. Was it supposed to delete the thing anyway, and then redirect if the user wasn't an admin?