get_sso_callback_url accesses the super-global variable $_SERVER. Open
function get_sso_callback_url()
{
if (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
$protocol = 'https://';
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
new_login accesses the super-global variable $_SERVER. Open
function new_login()
{
$action = $_SERVER['PHP_SELF'] . '?action=submitsecrets';
$callback = get_sso_callback_url();
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
get_sso_callback_url accesses the super-global variable $_SERVER. Open
function get_sso_callback_url()
{
if (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
$protocol = 'https://';
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
print_tokens accesses the super-global variable $_SERVER. Open
function print_tokens($access_token, $refresh_token)
{
$start_again_url = $_SERVER['PHP_SELF'] . '?action=new';
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
get_sso_callback_url accesses the super-global variable $_SERVER. Open
function get_sso_callback_url()
{
if (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
$protocol = 'https://';
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
get_sso_callback_url accesses the super-global variable $_SERVER. Open
function get_sso_callback_url()
{
if (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
$protocol = 'https://';
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
redirect_to_new accesses the super-global variable $_SERVER. Open
function redirect_to_new()
{
header('Location: ' . $_SERVER['PHP_SELF'] . '?action=new');
exit;
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method new_login
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
function new_login()
{
$action = $_SERVER['PHP_SELF'] . '?action=submitsecrets';
$callback = get_sso_callback_url();
File index.php
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of SeAT
*
The function new_login() has 142 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function new_login()
{
$action = $_SERVER['PHP_SELF'] . '?action=submitsecrets';
$callback = get_sso_callback_url();
- Exclude checks
The function redirect_to_new() contains an exit expression. Open
exit;
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}