Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit 7548873

Browse files
committed
[security] api: don't show mail password and sensible login data
We don't need to access the mail password via javascript, same applies for login username and hashed password. More restriction should be considered. Change-Id: Iceaa00f6c26987a4aedd65621d2199e9146b62d1
1 parent 049d1ab commit 7548873

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

api/config.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,11 @@
22
header('Content-Type: application/javascript');
33

44
require '../lib/config.php';
5+
6+
// Override secret configuration we don't need access from javascript for
7+
$config['mail']['password'] = 'secret';
8+
$config['login']['username'] = 'secret';
9+
$config['login']['password'] = 'secret';
510
?>
6-
const config = <?= json_encode($config) ?>;
11+
const config = <?= json_encode($config) ?>;
12+

0 commit comments

Comments
 (0)