BVS Banner

Posts Tagged ‘congratulations’

PHP $_SERVER variables are not safe for use in forms, links

Wednesday, September 23rd, 2009

A common security mistake I see WordPress plugin authors (and PHP coders in general) make is using $_SERVER['PHP_SELF'] or $_SERVER['REQUEST_URI'] as the action of a form or part of an anchor’s href attribute. This is not safe to do, and opens your code up to XSS (cross-site scripting) exploits.

Common example:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>">

Another example:

<a href="<?php echo $_SERVER['PHP_SELF']' ?>?foo=bar">link title</a>

Here are my two rules regarding $_SERVER['PHP_SELF'] or $_SERVER['REQUEST_URI'] in forms:

  • Do not use them
  • If you use one of them, escape it with esc_url()

(more…)

VN:F [1.8.8_1072]
Rating: 2.7/5 (3 votes cast)
VN:F [1.8.8_1072]
Rating: +1 (from 3 votes)
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks
  • Share/Save

My Own Developer Launching!

Tuesday, August 11th, 2009

Personal portfolio site will be launched this October 2, 2009.

I am pleased to say that for the last 12 months I have been trying hard to finish this site converting it into a melting pot of ideas and concepts. Everyday is an excruciating experience when I look at the site and see white screen cripple over it. But with a hand full of inspiration coming from my family, I was able to subdue barrens of sleepless nights and restless days just to come up with a final realization. I am proud to announce that MOD (My Own Developer) my personal portfolio and blog site is now official open!

VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks
  • Share/Save
Freelance Web Developers | Entries (RSS) | and Comments (RSS)