Browse Source

rename CSRFToken() to the more apt CSRFTokenFieldTag()

pull/356/head
glaszig 3 years ago
parent
commit
f36b08c10a
  1. 2
      includes/admin.php
  2. 2
      includes/configure_client.php
  3. 2
      includes/functions.php
  4. 2
      includes/hostapd.php
  5. 2
      includes/system.php

2
includes/admin.php

@ -40,7 +40,7 @@ function DisplayAuthConfig($username, $password)
<div class="panel-body">
<p><?php $status->showMessages(); ?></p>
<form role="form" action="?page=auth_conf" method="POST">
<?php echo CSRFToken() ?>
<?php echo CSRFTokenFieldTag() ?>
<div class="row">
<div class="form-group col-md-4">
<label for="username"><?php echo _("Username"); ?></label>

2
includes/configure_client.php

@ -182,7 +182,7 @@ function DisplayWPAConfig()
</div>
<form method="POST" action="?page=wpa_conf" name="wpa_conf_form">
<?php echo CSRFToken() ?>
<?php echo CSRFTokenFieldTag() ?>
<input type="hidden" name="client_settings" ?>
<script>
function showPassword(index) {

2
includes/functions.php

@ -67,7 +67,7 @@ function ensureCSRFSessionToken()
* Add CSRF Token to form
*
*/
function CSRFToken()
function CSRFTokenFieldTag()
{
$token = htmlspecialchars($_SESSION['csrf_token']);
return '<input id="csrf_token" type="hidden" name="csrf_token" value="' . $token . '">';

2
includes/hostapd.php

@ -83,7 +83,7 @@ function DisplayHostAPDConfig()
<div class="tab-pane fade in active" id="basic">
<h4><?php echo _("Basic settings") ;?></h4>
<?php echo CSRFToken() ?>
<?php echo CSRFTokenFieldTag() ?>
<div class="row">
<div class="form-group col-md-4">
<label for="cbxinterface"><?php echo _("Interface") ;?></label>

2
includes/system.php

@ -200,7 +200,7 @@ if (isset($_POST['system_shutdown'])) {
<div role="tabpanel" class="tab-pane" id="language">
<h4><?php echo _("Language settings") ;?></h4>
<?php echo CSRFToken() ?>
<?php echo CSRFTokenFieldTag() ?>
<div class="row">
<div class="form-group col-md-4">
<label for="code"><?php echo _("Select a language"); ?></label>

Loading…
Cancel
Save