summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/rest/helpers/rest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index cd3de725..324b7f98 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -75,6 +75,10 @@ class rest_Core {
$path = parse_url($relative_url, PHP_URL_PATH);
$components = explode("/", $path, 3);
+ if (count($components) != 3) {
+ throw new Kohana_404_Exception($url);
+ }
+
$class = "$components[1]_rest";
if (!method_exists($class, "resolve")) {
throw new Kohana_404_Exception($url);