Fix check.php for new domain registration form
This commit is contained in:
parent
bd06fc7fbf
commit
088fe9ee53
1 changed files with 3 additions and 2 deletions
|
@ -42,7 +42,6 @@ function curlTest($path, $args) {
|
||||||
CURLOPT_COOKIEJAR => COOKIE_FILE,
|
CURLOPT_COOKIEJAR => COOKIE_FILE,
|
||||||
CURLOPT_POSTFIELDS => $args,
|
CURLOPT_POSTFIELDS => $args,
|
||||||
]);
|
]);
|
||||||
var_dump(curl_error($req));
|
|
||||||
$status_code = curl_getinfo($req, CURLINFO_RESPONSE_CODE);
|
$status_code = curl_getinfo($req, CURLINFO_RESPONSE_CODE);
|
||||||
if ($status_code >= 400) {
|
if ($status_code >= 400) {
|
||||||
var_dump(curl_exec($req));
|
var_dump(curl_exec($req));
|
||||||
|
@ -94,6 +93,7 @@ var_dump($subdomain);
|
||||||
curlTest('/reg/register', [
|
curlTest('/reg/register', [
|
||||||
'subdomain' => $subdomain,
|
'subdomain' => $subdomain,
|
||||||
'suffix' => SUFFIX,
|
'suffix' => SUFFIX,
|
||||||
|
'action' => 'register',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
curlTest('/reg/ns', [
|
curlTest('/reg/ns', [
|
||||||
|
@ -130,7 +130,6 @@ if (proc_close($process) !== 0)
|
||||||
$html = curlTest('/ht/add-onion', [
|
$html = curlTest('/ht/add-onion', [
|
||||||
'dir' => '_site0-'
|
'dir' => '_site0-'
|
||||||
]);
|
]);
|
||||||
var_dump($html);
|
|
||||||
if (preg_match('#\<code\>http\://(?<onion>[0-9a-z]{56})\.onion/\</code\>#D', $html, $matches) !== 1)
|
if (preg_match('#\<code\>http\://(?<onion>[0-9a-z]{56})\.onion/\</code\>#D', $html, $matches) !== 1)
|
||||||
exit('Can\'t find onion address.');
|
exit('Can\'t find onion address.');
|
||||||
|
|
||||||
|
@ -156,3 +155,5 @@ curlTest('/auth/unregister', [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
unlink(COOKIE_FILE);
|
unlink(COOKIE_FILE);
|
||||||
|
|
||||||
|
echo 'OK' . LF;
|
||||||
|
|
Loading…
Reference in a new issue