Try to ensure full paths don't leak into xchan_addr and hubloc_addr
This commit is contained in:
parent
df3cf811f0
commit
7546117388
5
boot.php
5
boot.php
@ -1316,6 +1316,11 @@ function fix_system_urls($oldurl,$newurl) {
|
|||||||
if(! $parsed)
|
if(! $parsed)
|
||||||
continue;
|
continue;
|
||||||
$newhost = $parsed['host'];
|
$newhost = $parsed['host'];
|
||||||
|
// sometimes parse_url returns unexpected results.
|
||||||
|
|
||||||
|
if(strpos($newhost,'/') !== false)
|
||||||
|
$newhost = substr($newhost,0,strpos($newhost,'/'));
|
||||||
|
|
||||||
$rhs = $newhost . (($parsed['port']) ? ':' . $parsed['port'] : '') . (($parsed['path']) ? $parsed['path'] : '');
|
$rhs = $newhost . (($parsed['port']) ? ':' . $parsed['port'] : '') . (($parsed['path']) ? $parsed['path'] : '');
|
||||||
|
|
||||||
$x = q("update xchan set xchan_addr = '%s', xchan_url = '%s', xchan_connurl = '%s', xchan_follow = '%s', xchan_connpage = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s' where xchan_hash = '%s' limit 1",
|
$x = q("update xchan set xchan_addr = '%s', xchan_url = '%s', xchan_connurl = '%s', xchan_follow = '%s', xchan_connpage = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s' where xchan_hash = '%s' limit 1",
|
||||||
|
@ -138,7 +138,7 @@ function zot_finger($webbie,$channel) {
|
|||||||
$r = q("select xchan.*, hubloc.* from xchan
|
$r = q("select xchan.*, hubloc.* from xchan
|
||||||
left join hubloc on xchan_hash = hubloc_hash
|
left join hubloc on xchan_hash = hubloc_hash
|
||||||
where xchan_addr = '%s' and (hubloc_flags & %d) limit 1",
|
where xchan_addr = '%s' and (hubloc_flags & %d) limit 1",
|
||||||
dbesc($xchan_address),
|
dbesc($xchan_addr),
|
||||||
intval(HUBLOC_FLAGS_PRIMARY)
|
intval(HUBLOC_FLAGS_PRIMARY)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user