VerifyAccess.php
authoredward <edward@roojs.com>
Wed, 14 Feb 2018 09:56:43 +0000 (17:56 +0800)
committeredward <edward@roojs.com>
Wed, 14 Feb 2018 09:56:43 +0000 (17:56 +0800)
VerifyAccess.php

index c5a3029..dee7aa7 100644 (file)
@@ -14,9 +14,29 @@ class Pman_Core_VerifyAccess extends Pman
     
     function get($id)
     {
-        
         @list($id, $key) = explode('/', $id);
         
+        $ff = HTML_FlexyFramework::get();
+        
+        $core_person = DB_DataObject::factory('core_person');
+        $core_ip_access = DB_DataObject::factory('core_ip_access');
+        
+        if(
+                empty($ff->Pman['ip_management']) || 
+                empty($ff->Pman['XMPP']) ||
+                empty($ff->Pman['XMPP']['to']) ||
+                !$core_person->get('email', $ff->Pman['XMPP']['to']) ||
+                empty($id) ||
+                empty($key) ||
+                !$core_ip_access->get($id) ||
+                $core_ip_access->authorized_key != $key
+        ) {
+            $this->jerr('Invalid URL');
+        }
+        
+        
+        
+        
         
         
     }