diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-16 22:03:24 +0000 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-16 22:03:24 +0000 |
commit | 440ab9039178bfc58c55316eb9ba2e19551bd12b (patch) | |
tree | f8d9c9c1fcfb877fa413afe937a57ba3fe676025 /plugins/OStatus/actions | |
parent | a116cde1a401b1959515b8e6b512c41603387031 (diff) |
OStatus: fix up some recent regressions in subscription setup; fix state checks and verification token, and avatar save on setup. Needs updates for new atom code next...
Diffstat (limited to 'plugins/OStatus/actions')
-rw-r--r-- | plugins/OStatus/actions/pushhub.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/OStatus/actions/pushhub.php b/plugins/OStatus/actions/pushhub.php index 901c18f70..13ec09d52 100644 --- a/plugins/OStatus/actions/pushhub.php +++ b/plugins/OStatus/actions/pushhub.php @@ -44,7 +44,7 @@ class PushHubAction extends Action // PHP converts '.'s in incoming var names to '_'s. // It also merges multiple values, which'll break hub.verify and hub.topic for publishing // @fixme handle multiple args - $arg = str_replace('.', '_', $arg); + $arg = str_replace('hub.', 'hub_', $arg); return parent::arg($arg, $def); } @@ -96,7 +96,11 @@ class PushHubAction extends Action $sub = new HubSub(); $sub->topic = $feed; $sub->callback = $callback; + $sub->verify_token = $this->arg('hub.verify_token', null); $sub->secret = $this->arg('hub.secret', null); + if (strlen($sub->secret) > 200) { + throw new ClientException("hub.secret must be no longer than 200 chars", 400); + } $sub->setLease(intval($this->arg('hub.lease_seconds'))); // @fixme check for feeds we don't manage |