[whatwg] idea about html code security anti xss

gabmeyer at westweb.at gabmeyer at westweb.at
Tue Jun 15 18:19:59 PDT 2010


I had just this idea after reading so much about xss and code injection.

I think there is a simple solution:

I now invent an attribute called strlen=""

I append this to a <div strlen="94843">htmlcode with strlen of 94843 bytes including whitespace</div>

The browser know knows the exact position where the divtag must end.

You cannot inject some code that closes the tag before.

you can now control the code inside the div.
you can also append a second attribute called "secure" that prevents any scriptcode to run from inside the div.

Maybe this idea is not new, or does not work.

Please let me know what you think about this idea.

Christian Gabmeyer 

More information about the whatwg mailing list