Skip to content

Commit

Permalink
Merge pull request #259 from D9ping/Branch_D9ping
Browse files Browse the repository at this point in the history
Fix incorrect escaping break lines of WPA and WPA2 secured networks.
  • Loading branch information
billz authored Oct 31, 2018
2 parents d9b2d20 + 54e5577 commit c366ef0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/configure_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function DisplayWPAConfig(){
<?php if (array_key_exists('priority', $network)) { ?>
<input type="hidden" name="priority<?php echo $index ?>" value="<?php echo htmlspecialchars($network['priority'], ENT_QUOTES); ?>" />
<?php } ?>
<input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>" /><?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>
<input type="hidden" name="protocol<?php echo $index ?>" value="<?php echo htmlspecialchars($network['protocol'], ENT_QUOTES); ?>" /><?php echo $network['protocol']; ?>
</td>
<?php if ($network['protocol'] === 'Open') { ?>
<td><input type="hidden" name="passphrase<?php echo $index ?>" value="" />---</td>
Expand Down
4 changes: 2 additions & 2 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ function ConvertToSecurity( $security ) {
$protocol = $protocol_match[1];
$matchArr = explode('-', $match);
if (count($matchArr) > 2) {
$options[] = $protocol . ' ('. $matchArr[2] .')';
$options[] = htmlspecialchars($protocol . ' ('. $matchArr[2] .')', ENT_QUOTES);
} else {
$options[] = $protocol;
$options[] = htmlspecialchars($protocol, ENT_QUOTES);
}
}
}
Expand Down

0 comments on commit c366ef0

Please sign in to comment.