SproutCMS

This is the code documentation for the SproutCMS project

class Security

Functions for implementing security, including secure random numbers

Source code (30 results)

/modules/Welcome/Controllers/WelcomeController.php   Highlighted file source

Line 34: use Sprout\Helpers\Security;
Line 375: $db_config = str_replace('{{SERVER-KEY}}', Security::randStr(16), $db_config);

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 47: use Sprout\Helpers\Security;
Line 1562: $_GET['s'] = Security::serverKeySign(['filename' => $temp_filename, 'size' => $size]);

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 47: use Sprout\Helpers\Security;
Line 1562: $_GET['s'] = Security::serverKeySign(['filename' => $temp_filename, 'size' => $size]);

/sprout/Controllers/Admin/MySettingsAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\Security;
Line 99: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);

/sprout/Controllers/Admin/MySettingsAdminController.php   Highlighted file source

Line 23: use Sprout\Helpers\Security;
Line 99: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);

/sprout/Controllers/Admin/OperatorAdminController.php   Highlighted file source

Line 25: use Sprout\Helpers\Security;
Line 201: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);
Line 331: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);

/sprout/Controllers/Admin/OperatorAdminController.php   Highlighted file source

Line 25: use Sprout\Helpers\Security;
Line 201: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);
Line 331: $complexity = Security::passwordComplexity($_POST['password1'], 8, 2, true);

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 59: use Sprout\Helpers\Security;
Line 1639: $approval_code = Security::randStr(12);
Line 1956: * Does custom actions before _deleteSave method is called, e.g. extra security checks

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 59: use Sprout\Helpers\Security;
Line 1639: $approval_code = Security::randStr(12);
Line 1956: * Does custom actions before _deleteSave method is called, e.g. extra security checks

/sprout/Controllers/CaptchaController.php   Highlighted file source

Line 16: use Sprout\Helpers\Security;
Line 39: $captcha_code = Security::randStr(mt_rand(8,10), 'QWERTYUOPASDFGHJKLZXCVBNMqwertyupasdfghjkzxcvbnm');
Line 65: imagettftext ($my_image, 12, $angle, $x, $y, 0x777777, DOCROOT . 'media/fonts/DejaVuSans.ttf', Security::randStr(10));

/sprout/Controllers/CaptchaController.php   Highlighted file source

Line 16: use Sprout\Helpers\Security;
Line 39: $captcha_code = Security::randStr(mt_rand(8,10), 'QWERTYUOPASDFGHJKLZXCVBNMqwertyupasdfghjkzxcvbnm');
Line 65: imagettftext ($my_image, 12, $angle, $x, $y, 0x777777, DOCROOT . 'media/fonts/DejaVuSans.ttf', Security::randStr(10));

/sprout/Controllers/FileController.php   Highlighted file source

Line 28: use Sprout\Helpers\Security;
Line 98: Security::serverKeyVerify(['filename' => $filename, 'size' => $size], @$_GET['s']);

/sprout/Controllers/FileController.php   Highlighted file source

Line 28: use Sprout\Helpers\Security;
Line 98: Security::serverKeyVerify(['filename' => $filename, 'size' => $size], @$_GET['s']);

/sprout/Helpers/Auth.php   Highlighted file source

Line 40: return Security::compareStrings($known_hash, $expected);
Line 44: return Security::compareStrings($known_hash, $expected);
Line 51: return Security::compareStrings($known_hash, $expected);
Line 56: return Security::compareStrings($known_hash, $expected);
Line 83: $salt = Security::randStr(10);
Line 88: $salt = Security::randStr(10);
Line 97: $salt .= Security::randStr(22, './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');

/sprout/Helpers/Csrf.php   Highlighted file source

Line 32: $_SESSION['csrf_token'] = Security::randStr(32);
Line 79: Notification::error('Session timeout or missing security token');

/sprout/Helpers/Csrf.php   Highlighted file source

Line 32: $_SESSION['csrf_token'] = Security::randStr(32);
Line 79: Notification::error('Session timeout or missing security token');

/sprout/Helpers/FilesBackendDirectory.php   Highlighted file source

Line 79: $signature = Security::serverKeySign(['filename' => $file_details['filename'], 'size' => $size]);
Line 88: $signature = Security::serverKeySign(['filename' => $filename, 'size' => $size]);

/sprout/Helpers/FilesBackendDirectory.php   Highlighted file source

Line 79: $signature = Security::serverKeySign(['filename' => $file_details['filename'], 'size' => $size]);
Line 88: $signature = Security::serverKeySign(['filename' => $filename, 'size' => $size]);

/sprout/Helpers/FileUpload.php   Highlighted file source

Line 85: throw new FileUploadException("This type of file cannot be uploaded for security reasons");
Line 144: $code = Security::randStr(32);

/sprout/Helpers/FileUpload.php   Highlighted file source

Line 85: throw new FileUploadException("This type of file cannot be uploaded for security reasons");
Line 144: $code = Security::randStr(32);

/sprout/Helpers/Security.php   Highlighted file source

Line 25: * Functions for implementing security, including secure random numbers
Line 27: class Security
Line 149: * $sig = Security::serverKeySign(['id' => $id]);
Line 168: * Verify a signature which was generated by {@see Security::serverKeySign}
Line 172: * Security::serverKeyVerify(['id' => $id], $_GET['sig']);

/sprout/Helpers/Spam.php   Highlighted file source

Line 34: $code = 'f_' . Security::randStr(12);

/sprout/Helpers/Spam.php   Highlighted file source

Line 34: $code = 'f_' . Security::randStr(12);

/sprout/Helpers/Sprout.php   Highlighted file source

Line 757: * @deprecated Use {@see Security::passwordComplexity} instead
Line 761: $errs = Security::passwordComplexity($str, 8, 0, false);

/sprout/Helpers/TwoFactor/GoogleAuthenticator.php   Highlighted file source

Line 27: use Sprout\Helpers\Security;
Line 139: $secret = Security::randBytes(self::$SECRET_LENGTH);

/sprout/Helpers/TwoFactor/GoogleAuthenticator.php   Highlighted file source

Line 27: use Sprout\Helpers\Security;
Line 139: $secret = Security::randBytes(self::$SECRET_LENGTH);

/sprout/Helpers/Validity.php   Highlighted file source

Line 93: $errs = Security::passwordComplexity($val, $length, $classes, $bad_list);

/sprout/Helpers/WorkerCtrl.php   Highlighted file source

Line 63: $job_code = Security::randStr(8);

/sprout/tests/securityHelperTest.php   Highlighted file source

Line 13: use Sprout\Helpers\Security;
Line 19: class securityHelperTest extends PHPUnit_Framework_TestCase
Line 24: $bytes = Security::randBytes(16);
Line 30: $byte = Security::randByte();
Line 36: $string = Security::randStr(16);
Line 48: 'Sprout\Helpers\Security::randBytes',
Line 53: 'Sprout\Helpers\Security::randStr',
Line 58: 'Sprout\Helpers\Security::randStr',
Line 63: 'Sprout\Helpers\Security::randStr',
Line 104: $this->assertTrue(Security::compareStrings('aaa', 'aaa'));
Line 105: $this->assertFalse(Security::compareStrings('aaa', 'bbb'));
Line 130: Security::compareStrings($xxx, $xxx);
Line 137: Security::compareStrings($xxx, $yyy);
Line 144: Security::compareStrings($xxx, $zzz);
Line 178: $errs = Security::passwordComplexity($string, $length, 0, false);
Line 210: $errs = Security::passwordComplexity($string, 0, $classes, false);
Line 228: $errs = Security::passwordComplexity($string, 0, 0, true);

/sprout/tests/securityHelperTest.php   Highlighted file source

Line 13: use Sprout\Helpers\Security;
Line 19: class securityHelperTest extends PHPUnit_Framework_TestCase
Line 24: $bytes = Security::randBytes(16);
Line 30: $byte = Security::randByte();
Line 36: $string = Security::randStr(16);
Line 48: 'Sprout\Helpers\Security::randBytes',
Line 53: 'Sprout\Helpers\Security::randStr',
Line 58: 'Sprout\Helpers\Security::randStr',
Line 63: 'Sprout\Helpers\Security::randStr',
Line 104: $this->assertTrue(Security::compareStrings('aaa', 'aaa'));
Line 105: $this->assertFalse(Security::compareStrings('aaa', 'bbb'));
Line 130: Security::compareStrings($xxx, $xxx);
Line 137: Security::compareStrings($xxx, $yyy);
Line 144: Security::compareStrings($xxx, $zzz);
Line 178: $errs = Security::passwordComplexity($string, $length, 0, false);
Line 210: $errs = Security::passwordComplexity($string, 0, $classes, false);
Line 228: $errs = Security::passwordComplexity($string, 0, 0, true);

A total of 100 lines in 30 files were found