* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/mod_caps.erl: Likewise
+ * src/mod_pubsub.erl: ignore unknown configuration fields (EJAB-762);
+ fix node authorization bug (EJAB-798)
+
+ * src/pubsub.hrl: remove unused pubsub_presence record
+
2008-12-08 Mickael Remond <mremond@process-one.net>
* src/ejabberd_c2s.erl: Enforce client stanza from attribute
[] -> none;
[XFields] when is_list(XFields) ->
case lists:keysearch("FORM_TYPE", 1, XFields) of
- {value, {_, ?NS_PUBSUB_SUB_AUTH}} ->
+ {value, {_, [?NS_PUBSUB_SUB_AUTH]}} ->
XFields;
_ ->
invalid
case {lists:keysearch("pubsub#node", 1, XFields),
lists:keysearch("pubsub#subscriber_jid", 1, XFields),
lists:keysearch("pubsub#allow", 1, XFields)} of
- {{value, {_, SNode}}, {value, {_, SSubscriber}},
- {value, {_, SAllow}}} ->
+ {{value, {_, [SNode]}}, {value, {_, [SSubscriber]}},
+ {value, {_, [SAllow]}}} ->
Node = case Host of
{_, _, _} -> [SNode];
_ -> string:tokens(SNode, "/")
%%options = Options,
owners = Owners}) ->
IsApprover = lists:member(jlib:jid_tolower(jlib:jid_remove_resource(From)), Owners),
- Subscription = node_call(Type, get_subscription, [Host, Node, Subscriber]),
+ {result, Subscription} = node_call(Type, get_subscription, [Host, Node, Subscriber]),
if
not IsApprover ->
{error, ?ERR_FORBIDDEN};
?SET_STRING_XOPT(type, Value);
set_xoption([{"pubsub#body_xslt", Value} | Opts], NewOpts) ->
?SET_STRING_XOPT(body_xslt, Value);
-set_xoption([_ | _Opts], _NewOpts) ->
- {error, ?ERR_NOT_ACCEPTABLE}.
+set_xoption([_ | Opts], NewOpts) ->
+ % skip unknown field
+ set_xoption(Opts, NewOpts).
%%%% plugin handling