[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15323 - in gauger: . web
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15323 - in gauger: . web |
Date: |
Fri, 27 May 2011 05:19:44 +0200 |
Author: bartpolot
Date: 2011-05-27 05:19:44 +0200 (Fri, 27 May 2011)
New Revision: 15323
Modified:
gauger/gauger
gauger/web/helper.php
gauger/web/hosts
gauger/web/io.php
Log:
Bugfixes+improvements
Modified: gauger/gauger
===================================================================
--- gauger/gauger 2011-05-27 02:48:13 UTC (rev 15322)
+++ gauger/gauger 2011-05-27 03:19:44 UTC (rev 15323)
@@ -150,7 +150,7 @@
f = urllib.urlopen(remoteurl, urllib.urlencode(l1))
except:
print >> sys.stderr, "Could not connect to", remoteurl
- exit(1)
+ exit(1)
try:
print f.read()
except:
Modified: gauger/web/helper.php
===================================================================
--- gauger/web/helper.php 2011-05-27 02:48:13 UTC (rev 15322)
+++ gauger/web/helper.php 2011-05-27 03:19:44 UTC (rev 15323)
@@ -40,13 +40,13 @@
$b = 0;
if(($e = strpos($s, '___')) === FALSE)
return substr($s, $b);
- return substr($s, $b, $e-$b);
+ return unesc_separators(substr($s, $b, $e-$b));
}
function get_counter_unit($s) {
$s = put_slashes($s);
if(($b = strpos($s, '___')) !== FALSE)
- return substr($s, $b+3);
+ return unesc_separators(substr($s, $b+3));
else
return "";
}
@@ -54,7 +54,7 @@
function get_counter_category($s) {
$s = put_slashes($s);
if(($b = strpos($s, ':::')) !== FALSE)
- return substr($s, 0, $b);
+ return unesc_separators(substr($s, 0, $b));
else
return "";
}
Modified: gauger/web/hosts
===================================================================
--- gauger/web/hosts 2011-05-27 02:48:13 UTC (rev 15322)
+++ gauger/web/hosts 2011-05-27 03:19:44 UTC (rev 15323)
@@ -27,10 +27,11 @@
}
/* if user/pass failed, try to retrieve from cookie/session */
if ($host == "" && array_key_exists('gauger_host', $_SESSION)) {
- $host = $_SESSION['gauger_user'];
+ $host = $_SESSION['gauger_host'];
}
/* if no method succeeded, fail */
if ($host == "") {
+ header('HTTP/1.1 401 Unauthorized');
die("Authentication rejected.");
}
$res = add_data_to_host($host, $_POST['name'], $_POST['revision'],
$_POST['value']);
Modified: gauger/web/io.php
===================================================================
--- gauger/web/io.php 2011-05-27 02:48:13 UTC (rev 15322)
+++ gauger/web/io.php 2011-05-27 03:19:44 UTC (rev 15323)
@@ -32,12 +32,12 @@
* DATADIR: root data directory
*/
$DATADIR = @$CONF['config']['data'] ? $CONF['config']['data'] : 'data/';
+if ($DATADIR[strlen($DATADIR)-1] != '/') $DATADIR .= '/';
/**
* PAGELENGTH: number of graphs per page in host mode
*/
$PAGELENGTH = @$CONF['config']['page_lenght'] ? $CONF['config']['page_lenght']
: 5;
-if ($DATADIR[strlen($DATADIR)-1] != '/') $DATADIR .= '/';
/**
* hosts: array with all hosts in form $hosts[hostname] = [metrics]
@@ -501,7 +501,7 @@
check_permissions($datadir, 'dir');
$datadir .= '/' . remove_slashes($h);
check_permissions($datadir, 'dir');
- $datadir .= '/' . unesc_separators(remove_slashes($g));
+ $datadir .= '/' . remove_slashes($g);
check_permissions($datadir, 'file');
check_permissions("$datadir.dat", 'file');
if(false === ($pos = add_data_to_file($datadir, $rev, $value))) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15323 - in gauger: . web,
gnunet <=