Skip to content

Commit 07c3bd9

Browse files
committed
Improved password protection of website statistics.
1 parent bf159b9 commit 07c3bd9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

interface/web/sites/templates/web_domain_stats.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
77
<fieldset class="inlineLabels">
88
<div class="ctrlHolder">
99
<label for="redirect_path">{tmpl_var name='stats_password_txt'}</label>
10-
<input name="stats_password" id="stats_password" value="{tmpl_var name='stats_password'}" size="30" maxlength="255" type="text" class="textInput" />
10+
<input name="stats_password" id="stats_password" value="{tmpl_var name='stats_password'}" size="30" maxlength="255" type="password" class="textInput" />
1111
</div>
1212
</fieldset>
1313

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ function update($event_name,$data) {
672672

673673
//* Create .htaccess and .htpasswd file for website statistics
674674
if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess')) {
675+
if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats');
675676
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\n<limit GET PUT POST>\nrequire valid-user\n</limit>";
676677
file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file);
677678
chmod($data["new"]["document_root"].'/web/stats/.htaccess',0664);

0 commit comments

Comments
 (0)