mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 02:38:55 +00:00
More changes to themes security.
This commit is contained in:
+13
-13
@@ -25,7 +25,7 @@ if ($showRegister == 1) {
|
||||
|
||||
//Be sure to persist the invite code in the event of multiple form submissions. (errors)
|
||||
if (isset($_REQUEST['invitecode'])) {
|
||||
$inviteCodeQuery = '&invitecode=' . htmlspecialchars($_REQUEST["invitecode"]);
|
||||
$inviteCodeQuery = '&invitecode=' . $_REQUEST["invitecode"];
|
||||
}
|
||||
|
||||
$captcha = new Captcha($page);
|
||||
@@ -33,12 +33,12 @@ if ($showRegister == 1) {
|
||||
switch ($action) {
|
||||
case 'submit':
|
||||
if ($captcha->getError() === false) {
|
||||
$userName = htmlspecialchars($_POST['username']);
|
||||
$password = htmlspecialchars($_POST['password']);
|
||||
$confirmPassword = htmlspecialchars($_POST['confirmpassword']);
|
||||
$email = htmlspecialchars($_POST['email']);
|
||||
$userName = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
$confirmPassword = $_POST['confirmpassword'];
|
||||
$email = $_POST['email'];
|
||||
if (!empty($_REQUEST['invitecode'])) {
|
||||
$inviteCode = htmlspecialchars($_REQUEST['invitecode']);
|
||||
$inviteCode = $_REQUEST['invitecode'];
|
||||
}
|
||||
|
||||
// Check uname/email isn't in use, password valid. If all good create new user account and redirect back to home page.
|
||||
@@ -84,7 +84,7 @@ if ($showRegister == 1) {
|
||||
}
|
||||
break;
|
||||
case "view": {
|
||||
$inviteCode = isset($_GET["invitecode"]) ? htmlspecialchars($_GET["invitecode"]) : null;
|
||||
$inviteCode = isset($_GET["invitecode"]) ? $_GET["invitecode"] : null;
|
||||
if (isset($inviteCode)) {
|
||||
// See if it is a valid invite.
|
||||
$invite = $page->users->getInvite($inviteCode);
|
||||
@@ -100,12 +100,12 @@ if ($showRegister == 1) {
|
||||
}
|
||||
}
|
||||
$page->smarty->assign([
|
||||
'username' => $userName,
|
||||
'password' => $password,
|
||||
'confirmpassword' => $confirmPassword,
|
||||
'email' => $email,
|
||||
'invitecode' => $inviteCode,
|
||||
'invite_code_query' => $inviteCodeQuery,
|
||||
'username' => htmlspecialchars($userName, ENT_QUOTES, 'UTF-8'),
|
||||
'password' => htmlspecialchars($password, ENT_QUOTES, 'UTF-8'),
|
||||
'confirmpassword' => htmlspecialchars($confirmPassword, ENT_QUOTES, 'UTF-8'),
|
||||
'email' => htmlspecialchars($email, ENT_QUOTES, 'UTF-8'),
|
||||
'invitecode' => htmlspecialchars($inviteCode, ENT_QUOTES, 'UTF-8'),
|
||||
'invite_code_query' => htmlspecialchars($inviteCodeQuery, ENT_QUOTES, 'UTF-8'),
|
||||
'showregister' => $showRegister,
|
||||
'error' => $error
|
||||
]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<pre>Content-Security-Policy: default-src self unsafe-inline unsafe-eval style-src self unsafe-inline unsafe-eval sandbox allow-forms allow-same-origin</pre>
|
||||
<head>
|
||||
{literal}
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<pre>Content-Security-Policy: default-src self unsafe-inline unsafe-eval style-src self unsafe-inline unsafe-eval sandbox allow-forms allow-same-origin</pre>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' http://www.google.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<pre>Content-Security-Policy: default-src self unsafe-inline unsafe-eval style-src self unsafe-inline unsafe-eval sandbox allow-forms allow-same-origin</pre>
|
||||
<head>
|
||||
{literal}
|
||||
<script>
|
||||
@@ -13,7 +14,6 @@
|
||||
</script>
|
||||
{/literal}
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'">
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<pre>Content-Security-Policy: default-src self unsafe-inline unsafe-eval style-src self unsafe-inline unsafe-eval sandbox allow-forms allow-same-origin</pre>
|
||||
<head>
|
||||
{literal}
|
||||
<script>
|
||||
@@ -12,6 +13,7 @@
|
||||
</script>
|
||||
{/literal}
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://code.ionicframework.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' 'unsafe-eval'">
|
||||
<title>{$page->meta_title}{if $page->meta_title != "" && $site->metatitle != ""} - {/if}{$site->metatitle}</title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- Newposterwall -->
|
||||
|
||||
Reference in New Issue
Block a user