Chris Shiflett

shiflett.org · Personal blog · on HN since 2007

Chris Shiflett, a PHP developer, writes about web security, HTTP, and web development, including XSS and escaping.

What HN saysHN links it for web security topics like XSS, though one commenter says its PHP security advice can mislead and points to an IBM post instead.
31HN people shared it
12linked it in comments
20stories submitted
296story points
5 months agolast shared
2007people per year2026

Most-shared posts

  1. 1
  2. 2
    Just You Wait
    2 people · 5 points · first shared 2026 · 1 comments on HN
  3. 3
    Foiling Cross-Site Attacks, by Chris Shiflett
    2 people · 1 points · first shared 2013 · discussion on HN
  4. 4
    Homepage
    2 people · first shared 2011
  5. 5
    My amazon anniversary
    2 people · first shared 2009
  6. 6
    JavaScript and URLs
    1 people · 134 points · first shared 2011 · 69 comments on HN
  7. 7
    The Accept Header
    1 people · 56 points · first shared 2011 · 8 comments on HN
  8. 8
    Rev="canonical" tags to cure short url problems
    1 people · 19 points · first shared 2009 · 13 comments on HN
  9. 9
    Hacking Rails (and GitHub)
    1 people · 18 points · first shared 2012 · discussion on HN
  10. 10
    LeakedIn - Check if you LinkedIn Password is Leaked
    1 people · 17 points · first shared 2012 · 7 comments on HN
  11. 11
    Javascript Study Guides
    1 people · 14 points · first shared 2012 · 1 comments on HN
  12. 12
    Indie Web Movement and IndieAuth
    1 people · 14 points · first shared 2015 · discussion on HN
  13. 13
    Allowing HTML and Preventing XSS (2007)
    1 people · 3 points · first shared 2014 · discussion on HN
  14. 14
    PHP Anthem
    1 people · 3 points · first shared 2010 · 2 comments on HN
  15. 15
    Security Corner: Cross-Site Request Forgeries
    1 people · 2 points · first shared 2007 · discussion on HN

What HN people wrote when they linked it

enobrev · 2011-08-08
I've done this on a couple well-visited client sites and it worked incredibly well. The best part is that it's super easy to add an invisible "email" field to a form and check if it has any content on the backend. By far the best bang for the buck. I'm fairly sure I first learned this trick from Chris Shiflett's blog[1] a few years back, although I can't seem to find the original post. 1: http://shiflett.org/
ecaron · 2009-07-02
Blog about website design + blog post about website security = Excellent source of well-intended data that perpetuates PHP code that people think is secure For a better post on securing PHP scripts, see IBM's post at http://www.ibm.com/developerworks/opensource/library/os-php-secure-app… or just see http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-… to understand why anyone recommending addslashes should be ignored.
robinhouston · 2012-06-07
bash$ diff -u <(curl -s http://leakedin.org) <(curl -s http://leakedln.org) --- /dev/fd/63 2012-06-07 15:31:02.000000000 +0100 +++ /dev/fd/62 2012-06-07 15:31:02.000000000 +0100 @@ -322,6 +322,7 @@ </noscript> <form id="leakedin-check" onsubmit="hashIt()"> <fieldset> + <input type="text" name="uname" id="uname" placeholder="Type your username here" /> <input autocomplete="off" type="text" name="check" id="check" onblur="hashIt()" placeholder="Type your password here" /> <button type="submit">Check</button> </fieldset> @@ -329,7 +330,7 @@ <div id="footer"> <p><a id="fk" href="http://fictivekin.com">Fictive Kin</a> and <a href="http://shiflett.org/">friends</a>.</p> </div> -<script src="//static.getclicky.com/js" type="text/javascript"></script> +<script src="/static.getclicky.com/js" type="text/javascript"></script> <script type="text/javascript">try{ clicky.init(66595923); }catch(e){}</script> -<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/66595923ns.gif" /></p></noscript> +<noscript><p><img alt="Clicky" width="1" height="1" src="/in.getclicky.com/66595923ns.gif" /></p></noscript> </body>
scoates · 2024-03-28
Hello. Thanks! This old blog design is showing its age, certainly, but I appreciate the nod to URL Sentences: https://shiflett.org/blog/2010/url-sentences
jperras · 2018-11-30
Many years ago, UTF-7 was a viable way in which you could try to exploit Internet Explorer's somewhat questionable default of interpreting a resource as UTF-7 if it finds a UTF-7 character in the first 4096 bytes: http://shiflett.org/blog/2005/googles-xss-vulnerability
acomjean · 2012-04-19
Looks like the same game as the "don't click" twitter button (that everyone clicked anyway) from 2009. That was iframes/css. http://shiflett.org/blog/2009/feb/twitter-dont-click-exploit
shiflett · 2011-08-10
Actually, you should also always indicate the character encoding, for reasons I explain here: http://shiflett.org/blog/2005/dec/google-xss-example
ckinnan · 2009-05-22
addslashes is NOT an appropriate way to prevent SQL injection attacks. Chris Shiflett explained the addslashes vulnerability years ago: http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-…
simonw · 2009-04-13
Amazon have had well documented CSRF holes for years: http://shiflett.org/blog/2007/mar/my-amazon-anniversary If this story turns out to be true (seems perfectly likely) maybe they'll finally start taking them seriously and fixing them.
bdotdub · 2008-07-03
I totally agree, except the date one. I feel like many people don't take the time to make their URLs look good. I do like when I can go to /2008/06 and see all the posts from June. Here's some more interesting reading on URL design: http://shiflett.org/blog/2008/mar/urls-can-be-beautiful
niftich · 2017-02-20
This is an old idea that is finally coming to fruition. See a Microsoft paper from 2011 that prominently features cookie isolation [1]. Or a 2012 proposal in Mozilla's bug tracker [2] which resulted in some proof-of-concept code early on, a writeup in 2013 hosted on Github [3]; blogged about independently and contemporaneously by others [4], which hit HN [5]. I've always taken a dim view on cross-domain requests in general [6] and the sprawling set of specifications (like most security headers) us developers have to learn and implement properly to stay one step ahead [7], and am not particularly enthused that this is opt-in instead of a heavy-handed mandate like some other recently-introduced features, the default opt-in is the more-secure but essentially session-destroying version meaning it's guaranteed to encourage a long and impassioned debate about whether Strict or Lax is the preferred balance. It's fascinating to go way back to ~2006-2008 and read about when CSRF was first starting to be recognized by mainstream evangelists, commentators, developers and decision-makers as a problem instead of a feature of just how the web works. This article on DarkReading from 2006 [8] was soon after cited by the OWASP wiki [9], Jeff Atwood first wrote about it in 2008 [10] and admitted its sublteness yet seriousness took him by surprise, and yet it's amusing that going back to 2003 you can find references to CSRF by that name and instructions on how to protect against it [11] --…
elviejo · 2011-06-19
I think what is normal is to let the company know first. And also give them a test they can reproduce with the bug and also a deadline in which you are going to make public the security bug you have done. The deadline is because many companies ignore the problem until is public. This opinion comes from reading this Chris Shifflet's article: http://shiflett.org/blog/2007/mar/my-amazon-anniversary "On this day last year, I informed Amazon about a pretty serious vulnerability and demonstrated it with a few examples and a detailed description. In the description, I explained how to exploit the infamous "1-Click" feature, causing victims to purchase items of my choosing without their knowledge or consent, and I stressed that the scope of the problem extended beyond my benign examples. After some mild prodding, I finally received a reply letting me know that my email had been received, the vulnerability had been verified, and Amazon considered fixing it a top priority.""

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close