Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web] - Missing octet in IP #865

Open
Rushaway opened this issue Feb 27, 2023 · 4 comments
Open

[Web] - Missing octet in IP #865

Rushaway opened this issue Feb 27, 2023 · 4 comments

Comments

@Rushaway
Copy link
Contributor

What are the steps to reproduce this issue?

  1. Login
  2. Go on servers page
  3. Right click on an user, select ban
  4. The first octet of the IP is missing

What happens?

The first octet of the IP is missing

What were you expecting to happen?

Have full IP.

Any logs, error output, etc.?

No errors on client & server side.

Any other comments?

N/A

What versions of software are you using?

Operating System: nginx
SourceBans++ Version: 1.8.0 (php 8.1 branch) with the lastest release.
PHP Version: 8.1.16
MySQL Version: 10.6.7-MariaDB-2ubuntu1 - Ubuntu 22.04
Link to your project: https://bans.nide.gg/index.php
Link to a phpinfo() output: https://upgradebans.nide.gg/phpinfo.php

@BitmapDummy
Copy link

When banning someone from the servers list the filled IP address is missing the first octet.
image
(Actual details here are fake, but it basically shows what happens.)

@BitmapDummy
Copy link

This can also be found when you:

  1. Join a server that you are assigned as an admin to
  2. Login to sourcebans
  3. Admin Panel
  4. Servers
  5. Click the Admins button for the server you're connected to
  6. Click the row for the connected admin to open admin details ingame
  7. See the IP Address of the connected admin

image

@F1F88
Copy link

F1F88 commented Jul 14, 2023

It should be a bug with a regular expression matching error.

You can try modifying this line in includes/system-functions.php

$regex = '/#\s*(\d+)(?>\s|\d)*"(.*)"\s*(STEAM_[01]:[01]:\d+|\[U:1:\d+\])(?>\s|:|\d)*[a-zA-Z]*\s*\d*\s*([0-9.]+)/';

Modify to:

$regex = '/#\s*(\d+)(?>\s|\d)*"(.*)"\s*(STEAM_[01]:[01]:\d+|\[U:1:\d+\])(?>\s|:|\d)*[a-zA-Z]*\s*\d*\s([0-9.]+)/';

@BitmapDummy
Copy link

That fixed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants