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

JWT secret outside <?php> #903

Open
Dragonisser opened this issue Jun 19, 2023 · 1 comment
Open

JWT secret outside <?php> #903

Dragonisser opened this issue Jun 19, 2023 · 1 comment

Comments

@Dragonisser
Copy link

Dragonisser commented Jun 19, 2023

What are the steps to reproduce this issue?

  1. Run upgrade.php
  2. Go to root page

What happens?

For some reason the "define" was added outside the <?php> and was shown publicly to everyone on the root page.

<?php
....
if(!defined('IN_SB')){echo 'You should not be here. Only follow links!';die();}
...
//define('DEVELOPER_MODE', true);			// Use if you want to show debugmessages
//define('SB_MEM', '128M'); 				// Override php memory limit, if isn't enough (Banlist is just a blank page)
?>define('SB_SECRET_KEY', ''); //Secret for JWT

What were you expecting to happen?

Its like all the other "define"

Any other comments?

Not entirely what i expected to see. Is there any way to regenerate the secret?

What versions of software are you using?

Operating System: ubuntu 20.04.3
SourceBans++ Version: 1.7 (latest)
PHP Version: 8.1

@Dragonisser
Copy link
Author

Dragonisser commented Jun 19, 2023

Checking the config templates and going back all versions to 1.6.0 i cant find the closing tag of the <?php> anywhere in the template. Not entirely sure why its in there but that explains why it broke like this.

Issue is therefore not entirely relevant, just for a few that added or autocompleted the closing tag.

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

1 participant