I have below code to accept User login ID as input from User.
<input name="userName" type="text" id="userID" maxlength="8"/></td>
Maximum number of characters that a end user can input is 8 here. If one has to carry out XSS attack like this by entering below code in input box,
<script type="javascript>hello</script> ,
which cannot be entered because of maxlength restriction, can I be assured that XSS attack of this category cannot be done?
In general, if input is restricted by maxlength, what is the minimum maxlength once should give to restrict XSS attack?
<. For example if theuserNamewere echoed to the page just before a stringscriptwhich is, by itself, innocuous. – bobince Feb 7 at 12:59