瀏覽代碼

fixed confirm regex

master
Robin Thoni 11 年之前
父節點
當前提交
9d1f5513fd
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      index.php

+ 2
- 2
index.php 查看文件

16
   $m_post = ($_SERVER['REQUEST_METHOD'] == "POST");
16
   $m_post = ($_SERVER['REQUEST_METHOD'] == "POST");
17
   $matches = array();
17
   $matches = array();
18
 
18
 
19
-  $path = rtrim($_GET['_url'], "/");
19
+  $path = rtrim($_GET["_url"], "/");
20
   if ($path === "")
20
   if ($path === "")
21
     $path = "/";
21
     $path = "/";
22
 
22
 
23
-  if (preg_match($path, "^/status/([0-9]+)/confirm$", $matches) && $m_post)
23
+  if (preg_match($path, "/^\/status\/([0-9]+)\/confirm$/", $matches) && $m_post)
24
     status_confirm($matches[1]);
24
     status_confirm($matches[1]);
25
   else if ($path === "/status" && $m_post)
25
   else if ($path === "/status" && $m_post)
26
     status_create();
26
     status_create();

Loading…
取消
儲存