|
@@ -49,7 +49,7 @@ if ($code !== 0)
|
|
serverError("Failed to reload Tor.");
|
|
serverError("Failed to reload Tor.");
|
|
|
|
|
|
// Get the address generated by Tor
|
|
// Get the address generated by Tor
|
|
-exec(CONF['ht']['sudo_path'] . " " . CONF['ht']['cat_path'] . " " . CONF['ht']['tor_keys_path'] . "/" . $_POST['dir'] . "/hostname", $output);
|
|
|
|
|
|
+exec(CONF['ht']['sudo_path'] . " -u " . CONF['ht']['tor_user'] . " " . CONF['ht']['cat_path'] . " " . CONF['ht']['tor_keys_path'] . "/" . $_POST['dir'] . "/hostname", $output);
|
|
$onion = $output[0];
|
|
$onion = $output[0];
|
|
if (preg_match("/[0-9a-z]{56}\.onion/", $onion) !== 1)
|
|
if (preg_match("/[0-9a-z]{56}\.onion/", $onion) !== 1)
|
|
serverError("No onion address found.");
|
|
serverError("No onion address found.");
|