mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-05 13:02:48 +02:00
fixes #822, add token on configuration page to prevent CSRF
This commit is contained in:
@@ -150,6 +150,7 @@ $mail_themes = array(
|
|||||||
//------------------------------ verification and registration of modifications
|
//------------------------------ verification and registration of modifications
|
||||||
if (isset($_POST['submit']))
|
if (isset($_POST['submit']))
|
||||||
{
|
{
|
||||||
|
check_pwg_token();
|
||||||
$int_pattern = '/^\d+$/';
|
$int_pattern = '/^\d+$/';
|
||||||
|
|
||||||
switch ($page['section'])
|
switch ($page['section'])
|
||||||
@@ -320,6 +321,7 @@ $action.= '&section='.$page['section'];
|
|||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=configuration',
|
'U_HELP' => get_root_url().'admin/popuphelp.php?page=configuration',
|
||||||
|
'PWG_TOKEN' => get_pwg_token(),
|
||||||
'F_ACTION'=>$action
|
'F_ACTION'=>$action
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -158,4 +158,5 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
@@ -58,4 +58,5 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
@@ -309,4 +309,5 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
@@ -215,4 +215,5 @@ jQuery("input[name='mail_theme']").change(function() {
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
@@ -231,4 +231,5 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
@@ -137,4 +137,5 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
|
||||||
</form>
|
</form>
|
||||||
Reference in New Issue
Block a user