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

Commit 080f850

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 b50f250 commit 080f850

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

api/config.php

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

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

0 commit comments

Comments
 (0)