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


Fifa officials 'corrupted football' (27 May 2015)


EU states 'must take 40,000 migrants' (27 May 2015)


France honours Resistance heroes (27 May 2015)


Blair quits Middle East envoy role (27 May 2015)


US military shipped Anthrax to labs (27 May 2015)


'New species' of ancient human found (28 May 2015)


Kenya payout over birth control (27 May 2015)


IS 'driven from Assyrian villages' (27 May 2015)


Nebraska abolishes death penalty (28 May 2015)


Marriage vote 'defeat for humanity' (27 May 2015)

more »


Slashdot News for nerds, stuff that matters


Computer Chips Made of Wood Promise Greener Electronics (2015-05-28T00:25:00+00:00)


Global Business Leaders Say They Don't Know Enough About Technology To Succeed (2015-05-27T23:43:00+00:00)


GM To Offer Apple CarPlay and Android Auto API In Most 2016 Vehicles (2015-05-27T23:00:00+00:00)


Making the World's Largest Panoramic Photo (2015-05-27T22:16:00+00:00)


California Is Giving Away Free Solar Panels To Its Poorest Residents (2015-05-27T21:33:00+00:00)


The Marshall Islands, Nuclear Testing, and the NPT (2015-05-27T20:50:00+00:00)


Microsoft Edge To Support Dolby Audio (2015-05-27T20:08:00+00:00)


Adblock Plus Victorious Again In Court (2015-05-27T19:25: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)


Janitors at Ross to share million settlement (27 May 2015)


FCC takes aim at annoying telemarketing calls (27 May 2015)


Munchery raises million for expansion (27 May 2015)


FIFA may face more pressure from sponsors (27 May 2015)


GM to offer Android, Apple systems in many 2016 models (27 May 2015)


U.S. urges European leaders to solve Greek crisis quickly (27 May 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-May-27 18:00