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

Commit

Permalink
[security] api: don't show mail password and sensible login data
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andi34 committed Jul 13, 2021
1 parent b50f250 commit bad10fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
header('Content-Type: application/javascript');

require '../lib/config.php';

// Override secret configuration we don't need access from javascript for
$config['mail']['password'] = 'secret';
$config['login']['username'] = 'secret';
$config['login']['password'] = 'secret';
?>
const config = <?= json_encode($config) ?>;
const config = <?= json_encode($config) ?>;

0 comments on commit bad10fc

Please sign in to comment.