Removed sectoken
This token is completly useless since an attacker can easily extract it from the page.
This commit is contained in:
parent
f5fe95a131
commit
578aa4e425
|
@ -12,7 +12,6 @@
|
||||||
<p class="infield">
|
<p class="infield">
|
||||||
<label for="password" class="infield"><?php echo $l->t( 'Password' ); ?></label>
|
<label for="password" class="infield"><?php echo $l->t( 'Password' ); ?></label>
|
||||||
<input type="password" name="password" id="password" value="" required<?php echo $_['user_autofocus']?'':' autofocus'; ?> />
|
<input type="password" name="password" id="password" value="" required<?php echo $_['user_autofocus']?'':' autofocus'; ?> />
|
||||||
<input type="hidden" name="sectoken" id="sectoken" value="<?php echo($_['sectoken']); ?>" />
|
|
||||||
</p>
|
</p>
|
||||||
<input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login"><?php echo $l->t('remember'); ?></label>
|
<input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login"><?php echo $l->t('remember'); ?></label>
|
||||||
<input type="submit" id="submit" class="login" value="<?php echo $l->t( 'Log in' ); ?>" />
|
<input type="submit" id="submit" class="login" value="<?php echo $l->t( 'Log in' ); ?>" />
|
||||||
|
|
|
@ -528,11 +528,7 @@ class OC{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function tryFormLogin() {
|
protected static function tryFormLogin() {
|
||||||
if(!isset($_POST["user"])
|
if(!isset($_POST["user"]) || !isset($_POST['password'])) {
|
||||||
|| !isset($_POST['password'])
|
|
||||||
|| !isset($_SESSION['sectoken'])
|
|
||||||
|| !isset($_POST['sectoken'])
|
|
||||||
|| ($_SESSION['sectoken']!=$_POST['sectoken']) ) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,9 +314,6 @@ class OC_Util {
|
||||||
$parameters["username"] = '';
|
$parameters["username"] = '';
|
||||||
$parameters['user_autofocus'] = true;
|
$parameters['user_autofocus'] = true;
|
||||||
}
|
}
|
||||||
$sectoken=rand(1000000,9999999);
|
|
||||||
$_SESSION['sectoken']=$sectoken;
|
|
||||||
$parameters["sectoken"] = $sectoken;
|
|
||||||
if (isset($_REQUEST['redirect_url'])) {
|
if (isset($_REQUEST['redirect_url'])) {
|
||||||
$redirect_url = OC_Util::sanitizeHTML($_REQUEST['redirect_url']);
|
$redirect_url = OC_Util::sanitizeHTML($_REQUEST['redirect_url']);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue