Skip to content

Commit

Permalink
FIX: localhost IPs were not clarified
Browse files Browse the repository at this point in the history
- fixes  Ignore localhost as IP Address #5 - thanks @axb21
  • Loading branch information
aljawaid committed Jan 30, 2023
1 parent d8c7901 commit f20179c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Template/auth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@

<?= $this->hook->render('template:auth:login-form:after') ?>

<kbd class="user-remote-ip"><?= t('Your IP:') ?> <?= $_SERVER["REMOTE_ADDR"]; ?></kbd>
<?php if ($_SERVER["REMOTE_ADDR"] == '127.0.0.1'): ?>
<kbd class="user-remote-ip"><?= t('Your IP:') ?> <i>localhost</i> ?></kbd>
<?php else: ?>
<kbd class="user-remote-ip"><?= t('Your IP:') ?> <?= $_SERVER["REMOTE_ADDR"]; ?></kbd>
<?php endif ?>
</div>
</div>
</div>
Expand Down

0 comments on commit f20179c

Please sign in to comment.