projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b7b34b
)
VerifyAccess.php
author
edward
<edward@roojs.com>
Thu, 15 Feb 2018 03:22:15 +0000
(11:22 +0800)
committer
edward
<edward@roojs.com>
Thu, 15 Feb 2018 03:22:15 +0000
(11:22 +0800)
VerifyAccess.php
patch
|
blob
|
history
diff --git
a/VerifyAccess.php
b/VerifyAccess.php
index
ff79ad5
..
0486eb3
100644
(file)
--- a/
VerifyAccess.php
+++ b/
VerifyAccess.php
@@
-16,27
+16,17
@@
class Pman_Core_VerifyAccess extends Pman
function get($id)
{
function get($id)
{
-
-
- return;
-
- }
-
- function validate($id)
- {
- $ret = array(
- 'is_valid' => true,
- 'errorMsg' => ''
- );
-
@list($id, $key) = explode('/', $id);
if(empty($id) || empty($key)){
@list($id, $key) = explode('/', $id);
if(empty($id) || empty($key)){
-
return false
;
+
$this->jerr('Invalid URL')
;
}
$core_ip_access = DB_DataObject::factory('core_ip_access');
}
$core_ip_access = DB_DataObject::factory('core_ip_access');
+ if(!$core_ip_access->get($id) || $core_ip_access->authorized_key != $key){
+ $this->jerr('This URL is broken');
+ }
$ff = HTML_FlexyFramework::get();
$ff = HTML_FlexyFramework::get();
@@
-57,6
+47,9
@@
class Pman_Core_VerifyAccess extends Pman
) {
$this->jerr('Invalid URL');
}
) {
$this->jerr('Invalid URL');
}
+
+ return;
+
}
}
}
}