From 469118baba078e067c710e1f7ab83152ecedb23f Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Thu, 8 Sep 2016 11:08:12 -0400 Subject: [PATCH] fix xss, remove broken post --- content/news/04-meet-the-lbry-founders.md | 9 ------ controller/Controller.class.php | 1 + controller/Request.class.php | 5 ++++ controller/Session.class.php | 8 +----- controller/action/MailActions.class.php | 20 +++++-------- controller/action/OpsActions.class.php | 16 +++++------ lib/exception/StopException.class.php | 5 ---- lib/i18n.class.php | 5 ---- model/CreditApi.class.php | 34 ----------------------- view/Response.class.php | 5 ---- 10 files changed, 22 insertions(+), 86 deletions(-) delete mode 100644 content/news/04-meet-the-lbry-founders.md delete mode 100644 model/CreditApi.class.php diff --git a/content/news/04-meet-the-lbry-founders.md b/content/news/04-meet-the-lbry-founders.md deleted file mode 100644 index d7d3ac19..00000000 --- a/content/news/04-meet-the-lbry-founders.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -author: jeremy -title: Meet the LBRY Founders -date: '2015-07-28 15:00:00' ---- - -Here about LBRY straight from the horse's mouth. If there were two horses, that is. And the horses had created a revolutionary system for distributing information. - - \ No newline at end of file diff --git a/controller/Controller.class.php b/controller/Controller.class.php index a4d8fb47..768a266c 100644 --- a/controller/Controller.class.php +++ b/controller/Controller.class.php @@ -100,6 +100,7 @@ class Controller '/why' => '/learn', '/feedback' => '/learn', '/faq/when-referral-payouts' => '/faq/referrals', + '/news/meet-the-lbry-founders' => '/team', ]; $tempRedirects = [ diff --git a/controller/Request.class.php b/controller/Request.class.php index 3337a4e0..ab4b1091 100644 --- a/controller/Request.class.php +++ b/controller/Request.class.php @@ -14,6 +14,11 @@ class Request return $_POST[$key] ?? $_GET[$key] ?? $default; } + public static function getPostParam(string $key, $default = null) + { + return $_POST[$key] ?? $default; + } + public static function getMethod(): string { if (!static::$method) diff --git a/controller/Session.class.php b/controller/Session.class.php index 6b923ca3..65f77548 100644 --- a/controller/Session.class.php +++ b/controller/Session.class.php @@ -1,14 +1,8 @@