about me


my software


Yucatán Photos

St Lucia Photos

Photo Album



< May 2012 >
   1 2 3 4 5
6 7 8 9101112

past articles »

Click for San Francisco, California Forecast

San Francisco, USA


&D\anger'"+<b>@?!mb Against Code Injection

I have to build my web app against code injection. I find that the problem requires us to see input string used in several different context.

  • In HTML/XML as text.
  • In HTML/XML as an attribute inside the quote.
  • In URL as query parameter.
  • In JavaScript to dynamically create or edit DOM elements.

In each context, there are different rule in escaping them. Since the data can move from one context to another, they have to be properly escaped in all cases.

To help test for proper escaping, I have come up with a string that has lots of special characters below. Put it in your test database and paste it in your input fields. Observe if this causes problem anywhere. In properly escaped system, the string should be transfered and reconstructed verbatim.


A related issue is whether your code support unicode correctly. I find it helpful to insert a string below into the test data to test it out right from the beginning.

  \u4e09\u570b\u5fd7 or

2012.05.01 [] - comments



blog comments powered by Disqus

past articles »


BBC News


UN confirms Palmyra temple destroyed (31 Aug 2015)


Hundreds of migrants arrive in Vienna (31 Aug 2015)


Netflix dropping thousands of titles (31 Aug 2015)


Thai court acquits Phuket reporters (01 Sep 2015)


Argentina 'Dirty War' baby found (01 Sep 2015)


Google in India antitrust probe (01 Sep 2015)


Nauru centre 'unsafe' for children (01 Sep 2015)


US clerk loses gay marriage battle (01 Sep 2015)


UK journalists arrested in Turkey (31 Aug 2015)


Rare hurricane hits Cape Verde (01 Sep 2015)

more »


Slashdot News for nerds, stuff that matters


Nearly Every Seabird May Be Eating Plastic By 2050 (2015-09-01T00:18:00+00:00)


Apple Partners With Cisco To Boost Enterprise Business (2015-08-31T23:35:00+00:00)


World's Most Powerful Digital Camera Sees Construction Green Light (2015-08-31T22:53:00+00:00)


How Artificial Intelligence Can Fight Air Pollution In China (2015-08-31T22:09:00+00:00)


Netflix Is Becoming Just Another TV Channel (2015-08-31T21:25:00+00:00)


The Long Reach of Windows 95 (2015-08-31T20:42:00+00:00)


3 Category 4 Hurricanes Develop In the Pacific At Once For the First Time (2015-08-31T20:00:00+00:00)


The Most Important Obscure Languages? (2015-08-31T19:17:00+00:00)

more »


TechPsychic Tech Rumors and Invented News

more »


SF Gate


Bay Area News (7 Jan 2012)


City Insider (11 Feb 2012)


Crime Scene (13 Feb 2012)


C.W Newius Column (10 Jan 2012)


C.W. Nevius Blog (11 Feb 2012)


Education News (10 Jan 2012)


KALW (11 Feb 2012)


Matier and Ross Blog (11 Feb 2012)


Google’s new Wi-Fi router sleek, but has a few hiccups (31 Aug 2015)


Fans rule at StubHub office in San Francisco’s SoMa (30 Aug 2015)


Would SF Prop. F spur Airbnb suits, with neighbor suing neighbor? (30 Aug 2015)


Best Bluetooth headphones of 2015 (30 Aug 2015)


VMworld kicks off at Moscone; will VMware appease the faithful? (29 Aug 2015)


Daily Briefing, Aug. 30 (29 Aug 2015)

more »


Asia Times Online


China ramps up charges against Zhou (Fri 20 Mar 2015 11:00:00 GMT)


'100 dead' in Myanmar fighting (Fri 20 Mar 2015 11:00:00 GMT)


Tunisian president vows no mercy (Fri 20 Mar 2015 11:00:00 GMT)


SPENGLER Israel's 'referendum' on 'two-state solution' (Fri 20 Mar 2015 11:00:00 GMT)


Russia, S Ossetia sign 'integration' pact (Fri 20 Mar 2015 11:00:00 GMT)


US military plunges Aquino into crisis (Fri 20 Mar 2015 11:00:00 GMT)


Rahmon celebrates Tajik democracy (Fri 20 Mar 2015 11:00:00 GMT)


THE BEAR'S LAIR Being old in 2040 no fun (Fri 20 Mar 2015 11:00:00 GMT)


China grant boosts Nepal ties (Fri 20 Mar 2015 11:00:00 GMT)

more »


Site feed Updated: 2015-Aug-31 21:00