Skip to content

Commit 9e11374

Browse files
committed
[plugin:dbsync] support "HYP_CSRF_TOKEN"
1 parent 91df7e8 commit 9e11374

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

xoops_trust_path/modules/xpwiki/plugin/dbsync.inc.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,16 +869,15 @@ function attach_db_init()
869869

870870
function plugin_dbsync_next_do()
871871
{
872-
// global $script,$post,$_links_messages;
873872

874873
//$token = $this->func->get_token_html();
875-
$token = '';
874+
$token = !empty($_SESSION['HYP_CSRF_TOKEN'])? '<input type="hidden" name="HypToken" value="'.htmlspecialchars($_SESSION['HYP_CSRF_TOKEN']).'" />' : '';
876875
$script = $this->func->get_script_uri();
877876
$html = <<<__EOD__
878877
<form method="POST" action="{$script}" onsubmit="return pukiwiki_check(this);">
879878
<div>
880879
{$token}
881-
<input type="hidden" name="encode_hint" value="" />
880+
<input type="hidden" name="encode_hint" value="{$this->cont['PKWK_ENCODING_HINT']}" />
882881
<input type="hidden" name="plugin" value="dbsync" />
883882
<input type="hidden" name="pmode" value="update" />
884883
<input type="hidden" name="init" value="{$this->root->post['init']}" />

0 commit comments

Comments
 (0)