Skip to content

Commit fb895d9

Browse files
authored
escaping string for prevention of XSS attacks.
1 parent c0f0332 commit fb895d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Views/register.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
<h5 class="card-title mb-5"><?= lang('Auth.register') ?></h5>
1111

1212
<?php if (session('error') !== null) : ?>
13-
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
13+
<div class="alert alert-danger" role="alert"><?= esc(session('error')) ?></div>
1414
<?php elseif (session('errors') !== null) : ?>
1515
<div class="alert alert-danger" role="alert">
1616
<?php if (is_array(session('errors'))) : ?>
1717
<?php foreach (session('errors') as $error) : ?>
18-
<?= $error ?>
18+
<?= esc($error) ?>
1919
<br>
2020
<?php endforeach ?>
2121
<?php else : ?>
22-
<?= session('errors') ?>
22+
<?= esc(session('errors')) ?>
2323
<?php endif ?>
2424
</div>
2525
<?php endif ?>

0 commit comments

Comments
 (0)