diff options
author | friendica <info@friendica.com> | 2013-10-29 21:49:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-29 21:49:10 -0700 |
commit | ed8f14549f366b3f72f485a32df354876f82f76e (patch) | |
tree | 75028e8e2a3f141fabfc4071be1a13f73f1d578c | |
parent | 7335f6724656e5e44353f1635226b1b6b43006e0 (diff) | |
download | volse-hubzilla-ed8f14549f366b3f72f485a32df354876f82f76e.tar.gz volse-hubzilla-ed8f14549f366b3f72f485a32df354876f82f76e.tar.bz2 volse-hubzilla-ed8f14549f366b3f72f485a32df354876f82f76e.zip |
send rpost requests from remote sites back to yours.
-rw-r--r-- | include/zot.php | 4 | ||||
-rw-r--r-- | mod/rpost.php | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php index 71d68700a..4ea217f1d 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1903,7 +1903,7 @@ function get_rpost_path($observer) { if(! $observer) return ''; $parsed = parse_url($observer['xchan_url']); - return $parsed['scheme'] . '://' . $parsed['host'] . (($parsed['port']) ? ':' . $parsed['port'] : '') . '/rpost?f='; -}
\ No newline at end of file +} + diff --git a/mod/rpost.php b/mod/rpost.php index 562040f1b..d7e4f963f 100644 --- a/mod/rpost.php +++ b/mod/rpost.php @@ -5,6 +5,7 @@ require_once('include/crypto.php'); require_once('include/items.php'); require_once('include/taxonomy.php'); require_once('include/conversation.php'); +require_once('include/zot.php'); /** * remote post @@ -34,8 +35,13 @@ function rpost_content(&$a) { // by the wretched beast called 'shusoin'. All the browsers now allow long GET requests, but suhosin // blocks them. - - + $url = get_rpost_path($a->get_observer()); + if($url) { + foreach($_REQUEST as $key => $arg) { + $url .= '&' . $key . '=' . $arg; + } + goaway($url); + } } // FIXME |