perform basic validation
This commit is contained in:
parent
becdb1f508
commit
dd27328390
2 changed files with 9 additions and 3 deletions
9
boot.php
9
boot.php
|
@ -1520,9 +1520,12 @@ function get_my_url() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function zrl_init(&$a) {
|
function zrl_init(&$a) {
|
||||||
proc_run('php','include/gprobe.php',bin2hex(get_my_url()));
|
$tmp_str = get_my_url();
|
||||||
$arr = array('zrl' => get_my_url(), 'url' => $a->cmd);
|
if(validate_url($tmp_str)) {
|
||||||
call_hooks('zrl_init',$arr);
|
proc_run('php','include/gprobe.php',bin2hex($tmp_str));
|
||||||
|
$arr = array('zrl' => $tmp_str, 'url' => $a->cmd);
|
||||||
|
call_hooks('zrl_init',$arr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function zrl($s,$force = false) {
|
function zrl($s,$force = false) {
|
||||||
|
|
|
@ -33,6 +33,9 @@ function gprobe_run($argv, $argc){
|
||||||
|
|
||||||
$url = hex2bin($argv[1]);
|
$url = hex2bin($argv[1]);
|
||||||
|
|
||||||
|
if(! validate_url($url))
|
||||||
|
return;
|
||||||
|
|
||||||
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
$r = q("select * from gcontact where nurl = '%s' limit 1",
|
||||||
dbesc(normalise_link($url))
|
dbesc(normalise_link($url))
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue