Fix login URL not working
This commit is contained in:
parent
82eef074d2
commit
c69650f82c
@ -1,4 +1,6 @@
|
|||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ([a-zA-Z0-9]+) index.php?action=$1 [PT]
|
RewriteRule ([a-zA-Z0-9]+) index.php?action=$1 [PT]
|
||||||
</IfModule>
|
</IfModule>
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
require __DIR__ . "/../../required.php";
|
require __DIR__ . "/../../required.php";
|
||||||
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
header("Content-Security-Policy: default-src '*';");
|
header("Content-Security-Policy: default-src '*';");
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
@ -38,7 +37,7 @@ function showHTML(string $title, string $button = "", string $url = "", string $
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<title><?php echo $SETTINGS['app_name']; ?></title>
|
<title><?php echo $SETTINGS['site_title']; ?></title>
|
||||||
|
|
||||||
<link rel="icon" href="<?php echo $iconurl; ?>">
|
<link rel="icon" href="<?php echo $iconurl; ?>">
|
||||||
|
|
||||||
@ -109,7 +108,7 @@ if (empty($_SESSION["login_code"])) {
|
|||||||
$addpassresp = AccountHubApi::get(
|
$addpassresp = AccountHubApi::get(
|
||||||
"addapppassword",
|
"addapppassword",
|
||||||
[
|
[
|
||||||
"desc" => $SETTINGS["app_name"],
|
"desc" => $SETTINGS["site_title"],
|
||||||
"username" => $user->getUsername()
|
"username" => $user->getUsername()
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -131,7 +130,7 @@ if (empty($_SESSION["login_code"])) {
|
|||||||
|
|
||||||
if ($redirecttologin) {
|
if ($redirecttologin) {
|
||||||
try {
|
try {
|
||||||
$codedata = AccountHubApi::get("getloginkey", ["appname" => $SETTINGS["app_name"], "appicon" => $iconurl], true);
|
$codedata = AccountHubApi::get("getloginkey", ["appname" => $SETTINGS["site_title"], "appicon" => $iconurl], true);
|
||||||
|
|
||||||
if ($codedata['status'] != "OK") {
|
if ($codedata['status'] != "OK") {
|
||||||
throw new Exception("There was a problem. Try again later.");
|
throw new Exception("There was a problem. Try again later.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user