From 8f11bce904d188b29e180a11113b51fdfade60b0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 16 May 2009 22:27:32 +0000 Subject: Don't allow photos, albums or movies to have a trailing period to avoid security problems. Ref http://dev.kohanaphp.com/issues/684). This plus r20823 resolves ticket #248. --- core/helpers/item.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/helpers/item.php') diff --git a/core/helpers/item.php b/core/helpers/item.php index bd54f2b1..8ff09535 100644 --- a/core/helpers/item.php +++ b/core/helpers/item.php @@ -78,4 +78,10 @@ class item_Core { $input->add_error("no_slashes", 1); } } + + static function validate_no_trailing_period($input) { + if (rtrim($input->value, ".") !== $input->value) { + $input->add_error("no_trailing_period", 1); + } + } } \ No newline at end of file -- cgit v1.2.3