Robert 2 years ago
parent 39bdb3f1a4
commit b6ff8855f5
  1. 4
      gulpfile.js
  2. 2
      src/bootstrap/auto_loader.php
  3. 2
      src/bootstrap/common.php
  4. 2
      src/bootstrap/errors.php
  5. 2
      src/bootstrap/requires.php
  6. 2
      src/classes/api.php
  7. 2
      src/classes/app.php
  8. 2
      src/classes/assets.php
  9. 2
      src/classes/console_app.php
  10. 2
      src/classes/database/dummy_data.php
  11. 2
      src/classes/database/model.php
  12. 4
      src/classes/database/paginate.php
  13. 2
      src/classes/enum/safer_io_enums.php
  14. 2
      src/classes/extras/safer_sql.php
  15. 2
      src/classes/html.php
  16. 2
      src/classes/html_document.php
  17. 2
      src/classes/loadall.php
  18. 2
      src/classes/memory_usage.php
  19. 2
      src/classes/misc.php
  20. 2
      src/classes/obsolete/http_socket_request.php
  21. 2
      src/classes/page_not_found.php
  22. 2
      src/classes/random_engine.php
  23. 11
      src/classes/router.php
  24. 3
      src/classes/security.php
  25. 2
      src/classes/services/cache/file.php
  26. 2
      src/classes/services/cache/redis_db.php
  27. 2
      src/classes/services/emailer.php
  28. 2
      src/classes/services/encryption.php
  29. 2
      src/classes/services/http_requests/http_curl_request.php
  30. 2
      src/classes/services/log.php
  31. 6
      src/classes/services/paragon_crypto/crypto.php
  32. 6
      src/classes/services/paragon_crypto/password_storage.php
  33. 2
      src/classes/services/paragon_crypto/sodium_storage.php
  34. 2
      src/classes/services/sessions/cookie_sessions.php
  35. 2
      src/classes/services/sessions/file_sessions.php
  36. 2
      src/classes/services/sessions/redis_sessions.php
  37. 8
      src/classes/services/simple_rest.php
  38. 2
      src/classes/session_management.php
  39. 2
      src/classes/tag_matches.php
  40. 2
      src/classes/time_zones.php
  41. 2
      src/classes/traits/database/validation.php
  42. 3
      src/classes/traits/security/session_hijacking_functions.php
  43. 1
      src/classes/validator.php
  44. 2
      src/classes/view.php
  45. 2
      src/compiler.php
  46. 2
      src/main.inc.php
  47. 2
      src/views/on_error/404_page.php
  48. 2
      src/views/on_error/prod_error.php

@ -1,7 +1,7 @@
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
const { src, dest, series, parallel, watch } = require('gulp');
@ -43,4 +43,4 @@ function watch_php() {
}
exports.default = series(watch_php);
exports.help = help;
exports.help = help;

@ -6,6 +6,8 @@ namespace bs_tts;
/**
* @author http://php-fig.org/ <info@php-fig.org>
* @copyright Copyright (c) 2013-2017 PHP Framework Interop Group
* @license MIT
* @site https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md
*/
class Psr4AutoloaderClass {

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace bs_tts;

@ -7,7 +7,7 @@ namespace bs_tts;
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
define('WORD_WRAP_CHRS', 80); // Letters before Line Wrap on Errors

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace bs_tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\database;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\database;

@ -5,6 +5,10 @@ declare(strict_types=1);
/**
* FROM site:
* @link https://code.tutsplus.com/tutorials/how-to-paginate-data-with-php--net-2928
* @author Jason
* @copyright 12/30/2020
*
* Emailed on July 30th, 2023 for permission to use/license type
*/
namespace tts\database;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\enum;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
/**

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
/**

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -3,8 +3,9 @@
declare(strict_types=1);
/**
* @ MIT License
* @license MIT
* @copyright (c) 2018, Patrik Mokrý
* @author Patrik Mokrý
* @link https://github.com/MokryPatrik/PHP-Router
*/
@ -558,9 +559,11 @@ class router
}
}
// Call method
$returned = call_user_func_array([$controller, $method], $resortedParams);
return ["found"=> true, "returned"=> $returned];
//Call method
if (method_exists($controller, $method)) {
$returned = call_user_func_array([$controller, $method], $resortedParams);
return ["found"=> true, "returned"=> $returned];
}
}
}
}

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;
@ -253,6 +253,7 @@ final class security {
$line = fgets($file_handle);
$pos = strpos($line, '<?php');
if ($pos !== false) {
fclose($file_handle);
return true;
}
}

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services\cache;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services\cache;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services\http_requests;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services;

@ -2,9 +2,9 @@
declare(strict_types=1);
/*
* @author Paragon Initiative Enterprises
* @copyright MIT
* https://paragonie.com/book/pecl-libsodium/read/05-publickey-crypto.md
* @license ISC
* @copyright Copyright (c) 2016-2023, Paragon Initiative Enterprises
* @link https://paragonie.com/book/pecl-libsodium/read/05-publickey-crypto.md
*/
namespace tts\services\paragon_crypto;

@ -5,9 +5,9 @@ declare(strict_types=1);
namespace tts\services\paragon_crypto;
/*
* @author Paragon Initiative Enterprises
* @copyright MIT
* https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md
* @copyright Paragon Initiative Enterprises
* @license Creative Commons Attribution 4.0 International / ISC
* @link https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md
*/
class password_storage {

@ -3,8 +3,8 @@
declare(strict_types=1);
/**
* @license MIT/ISC
* @author Robert Strutts, Original works by Paragon Initiative Enterprises
* @license MIT
* @link https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md
*
* I've added HKDF extracts a pseudorandom key (PRK) using an HMAC hash function

@ -7,7 +7,7 @@ namespace tts\services\sessions;
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
class cookie_sessions_handler_exception extends \Exception {}

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services\sessions;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\services\sessions;

@ -19,7 +19,9 @@ class simple_rest {
return ['uri' => $uri, 'method' => $request_method];
}
// https://developer.okta.com/blog/2019/03/08/simple-rest-api-php
/**
* @link https://developer.okta.com/blog/2019/03/08/simple-rest-api-php
*/
public function set_http_headers($content_type = "application/json; charset=UTF-8", $status_code = 200) {
$status_message = $this->get_http_status_message($status_code);
header("Access-Control-Allow-Origin: *");
@ -30,7 +32,9 @@ class simple_rest {
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
}
// https://phppot.com/php/php-restful-web-service/
/**
* @link https://phppot.com/php/php-restful-web-service/
*/
public function get_http_status_message($status_code): string {
return match ($status_code) {
100 => 'Continue',

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts\traits\database;

@ -4,7 +4,8 @@ declare(strict_types=1);
namespace tts\traits\security;
/**
* @site https://gist.github.com/ohidxy/cc361bb40fb3fbb3fe9112c99d51f69e
* author site did not work to contact him July 30th, 2023
* @link https://gist.github.com/ohidxy/cc361bb40fb3fbb3fe9112c99d51f69e
* Codes to prevent SESSION Hijacking and Fixation in PHP
*/

@ -3,6 +3,7 @@
declare(strict_types=1);
/**
* Emailed contact us form on July, 30th, 2023 for permission to use, author, and copyright...
* @link https://www.phptutorial.net/php-tutorial/php-validation/
*/

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
$show_authors = true;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
namespace main_tts;

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
$protocol = "HTTP/1.0";

@ -5,7 +5,7 @@ declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
* @license MIT
*/
define('PRODUCTION', 600);

Loading…
Cancel
Save