diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2022-03-20 14:37:19 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2022-03-20 15:34:24 +0100 |
commit | b3ca31bce7ed0dd5777458005718ba96985cbdc2 (patch) | |
tree | e95a34664c278c76f8c4f68fd2749c91a6d046d6 /Zotlabs/Module/Settings/Network.php | |
parent | b02f6a1dae3e3fae4af4b24e65256cdf653b2515 (diff) | |
download | volse-hubzilla-b3ca31bce7ed0dd5777458005718ba96985cbdc2.tar.gz volse-hubzilla-b3ca31bce7ed0dd5777458005718ba96985cbdc2.tar.bz2 volse-hubzilla-b3ca31bce7ed0dd5777458005718ba96985cbdc2.zip |
CVE-2022-27256: Open redirect via rpath query param.
Don't follow urls to external sites when submitting forms from the
settings modules. This mitigates an Open Redirect vulnerability where an
attacker could trick a user to go to an attacker controlled destination.
Fixes part of https://framagit.org/hubzilla/core/-/issues/1666
Diffstat (limited to 'Zotlabs/Module/Settings/Network.php')
-rw-r--r-- | Zotlabs/Module/Settings/Network.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Settings/Network.php b/Zotlabs/Module/Settings/Network.php index 89b562d90..eae963a25 100644 --- a/Zotlabs/Module/Settings/Network.php +++ b/Zotlabs/Module/Settings/Network.php @@ -21,10 +21,10 @@ class Network { $network_divmore_height = 50; set_pconfig(local_channel(),'system','network_divmore_height', $network_divmore_height); - + Libsync::build_sync_packet(); - if($_POST['rpath']) + if(isset($_POST['rpath']) && is_local_url($_POST['rpath'])) goaway($_POST['rpath']); return; @@ -61,7 +61,7 @@ class Network { '$extra_settings_html' => $extra_settings_html, '$submit' => t('Submit') )); - + return $o; } |