Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Escape variables in mfa module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Dec 8, 2014
1 parent d249394 commit 20b98d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions modules/mfa/views/config/index.phtml
Expand Up @@ -66,24 +66,24 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/config/config.i
</div>
<div class="formElement">
<label for="radiusServer">The IP or hostname of the RADIUS server</label>
<input id="radiusServer" name="radiusServer" value="<?php echo $this->radiusServer; ?>" autofocus/>
<input id="radiusServer" name="radiusServer" value="<?php echo $this->escape($this->radiusServer); ?>" autofocus/>
</div>
<div class="formElement">
<label for="radiusPort">The port of the RADIUS server</label>
<input id="radiusPort" name="radiusPort" value="<?php echo $this->radiusPort; ?>"/>
<input id="radiusPort" name="radiusPort" value="<?php echo $this->escape($this->radiusPort); ?>"/>
</div>
<div class="formElement">
<label for="radiusPassword">The password of the RADIUS server</label>
<input type="password" id="radiusPassword" name="radiusPassword"
value="<?php echo $this->radiusPassword; ?>"/>
value="<?php echo $this->escape($this->radiusPassword); ?>"/>
</div>
<div class="formElement">
<label for="radiusTimeout">The timeout when connecting to the RADIUS server</label>
<input id="radiusTimeout" name="radiusTimeout" value="<?php echo $this->radiusTimeout; ?>"/>
<input id="radiusTimeout" name="radiusTimeout" value="<?php echo $this->escape($this->radiusTimeout); ?>"/>
</div>
<div class="formElement">
<label for="radiusMaxTries">The maximum number of tries when connecting to the RADIUS server</label>
<input id="radiusMaxTries" name="radiusMaxTries" value="<?php echo $this->radiusMaxTries; ?>"/>
<input id="radiusMaxTries" name="radiusMaxTries" value="<?php echo $this->escape($this->radiusMaxTries); ?>"/>
</div>
</div>
<div class="saveButton">
Expand Down
8 changes: 4 additions & 4 deletions modules/mfa/views/config/usertab.phtml
Expand Up @@ -23,7 +23,7 @@ echo '<script type="text/javascript" src="'.$this->moduleWebroot.'/public/js/con
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot ?>/public/css/config/config.usertab.css"/>

<form class="genericForm" id="mfaConfigForm" method="POST" action="<?php echo $this->webroot ?>/mfa/config/usersubmit">
<input type="hidden" name="userId" value="<?php echo $this->user->getKey(); ?>"/>
<input type="hidden" name="userId" value="<?php echo $this->escape($this->user->getKey()); ?>"/>

<div class="useOtpCheckboxContainer">
<input id="useOtpCheckbox" type="checkbox" name="useOtp" <?php if ($this->useOtp) {
Expand All @@ -40,7 +40,7 @@ echo '<script type="text/javascript" src="'.$this->moduleWebroot.'/public/js/con
if ($this->algorithm == $val) {
echo 'selected="selected" ';
}
echo 'value="'.$val.'">'.$text.'</option>';
echo 'value="'.$this->escape($val).'">'.$this->escape($text).'</option>';
}
?>
</select></td>
Expand All @@ -49,14 +49,14 @@ echo '<script type="text/javascript" src="'.$this->moduleWebroot.'/public/js/con
<tr>
<td>Key:</td>
<td>
<input id="otpSecret" type="text" name="secret" value="<?php echo $this->secret; ?>"/>
<input id="otpSecret" type="text" name="secret" value="<?php echo $this->escape($this->secret); ?>"/>
</td>
</tr>

<tr>
<td>Token Length:</td>
<td>
<input id="otpLength" type="text" name="length" value="<?php echo $this->length; ?>"/>
<input id="otpLength" type="text" name="length" value="<?php echo $this->escape($this->length); ?>"/>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion modules/mfa/views/login/dialog.phtml
Expand Up @@ -23,7 +23,7 @@ echo '<script type="text/javascript" src="'.$this->moduleWebroot.'/public/js/log
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot ?>/public/css/login/login.dialog.css"/>

<form class="genericForm" id="mfaLoginForm" method="POST" action="<?php echo $this->webroot ?>/mfa/login/submit">
<input type="hidden" name="userId" value="<?php echo $this->user->getKey(); ?>"/>
<input type="hidden" name="userId" value="<?php echo $this->escape($this->user->getKey()); ?>"/>

<div>
<input id="otpToken" type="password" name="token"/>
Expand Down

0 comments on commit 20b98d3

Please sign in to comment.