diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-11 00:31:46 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-11 00:31:46 +0500 |
| commit | 07ab31dc06b3071af7cd6e5c8a88f2507ac109ee (patch) | |
| tree | 91bd5e2b8296f41987d96b4812f600ebdd7120c3 | |
| parent | 84ca542d26832d5d995a3106e7cbf0acc1ede6f3 (diff) | |
fix: hide secret in configuration
| -rw-r--r-- | system/config.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/system/config.php b/system/config.php index e03e95b..4a1a9da 100644 --- a/system/config.php +++ b/system/config.php @@ -25,6 +25,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } foreach ($_POST as $k => $v) { + if ($v == '****') { + continue; + } + $parts = explode('_', $k); $part_count = count($parts); if ($part_count != 2) { @@ -70,6 +74,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { <div class="container"> <div class="wrapper"> <?php html_navigation_bar() ?> + <?php display_alert(); ?> <section class="content"> <h1>Instance configuration</h1> <?php if (!file_exists(CFG_PATH)): ?> @@ -112,8 +117,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { </tr> <tr> <th>Password</th> - <td><input type="password" name="database_pass" - value="<?= CONFIG['database']['pass'] ?>" required></td> + <td><input type="password" name="database_pass" value="****" required></td> </tr> <tr> <th>Host</th> @@ -284,8 +288,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { </tr> <tr> <th>Client secret</th> - <td><input type="password" name="twitch_clientsecret" - value="<?= CONFIG['twitch']['clientsecret'] ?>"> + <td><input type="password" name="twitch_clientsecret" value="****"> </td> </tr> <tr> |
