mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
Fix bug 1856 : CSRF issue that allow to change admin password
Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6903 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+5
-1
@@ -25,8 +25,12 @@ if( !defined("PHPWG_ROOT_PATH") ) die ("Hacking attempt!");
|
||||
|
||||
$edit_user = build_user( $_GET['user_id'], false );
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'profile.php');
|
||||
if (!empty($_POST))
|
||||
{
|
||||
check_pwg_token();
|
||||
}
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'profile.php');
|
||||
|
||||
$errors = array();
|
||||
if ( !is_adviser() )
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
</fieldset>
|
||||
|
||||
<p class="bottomButtons">
|
||||
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||
<input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
|
||||
<input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user