From: Tim Düsterhus Date: Wed, 29 Mar 2017 12:01:32 +0000 (+0200) Subject: Fix FacebookAuthAction X-Git-Tag: 2.0.15_pl_1~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=834f639f2ccbe17fbed7bc7a9ea031c683566573;p=GitHub%2FWoltLab%2FWCF.git Fix FacebookAuthAction --- diff --git a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php index 545e08757a..da1deecd25 100644 --- a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php +++ b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php @@ -56,7 +56,14 @@ class FacebookAuthAction extends AbstractAction { if (!isset($_GET['state']) || $_GET['state'] != WCF::getSession()->getVar('__facebookInit')) throw new IllegalLinkException(); WCF::getSession()->unregister('__facebookInit'); - parse_str($content, $data); + try { + $data = JSON::decode($content); + } + catch (SystemException $e) { + parse_str($content, $data); + } + + if (!isset($data['access_token'])) throw new IllegalLinkException(); try { // fetch userdata