Skip to content

Commit 31e6888

Browse files
author
Daniel Neto
committed
fix: Escape IP address input to prevent XSS vulnerabilities
GHSA-jqrj-chh6-8h78
1 parent 34f0237 commit 31e6888

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugin/User_Location/testIP.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</div>
3232
<div class="panel-body">
3333
<label for="ip"><?php echo __("IP Address"); ?>:</label>
34-
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo $ip; ?>">
34+
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo htmlspecialchars($ip, ENT_QUOTES, 'UTF-8'); ?>">
3535
<?php
3636
if (!empty($location)) {
3737
echo '<div class="alert alert-success">';
@@ -57,4 +57,4 @@
5757
</script>
5858
<?php
5959
$_page->print();
60-
?>
60+
?>

0 commit comments

Comments
 (0)