mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-12-05 00:22:19 +00:00
dialbackerrors.patch from fippo
This commit is contained in:
parent
cfbd6c8827
commit
1a38cfdc6f
@ -10,7 +10,11 @@ vim:nosmarttab:syntax=diff
|
||||
________________________________________________________________________
|
||||
== SERIOUS!!! ==========================================================
|
||||
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
- make polly use oauth - deadline: june
|
||||
- check in user:input() if data is in utf8 (using RE_UTF8) in order to produce
|
||||
proper error messages before it is processed further and may end up in
|
||||
net/jabber's emit() where it is dropped silently (see CHARS_XMPP.log)
|
||||
|
||||
- make polly use oauth
|
||||
|
||||
- remote psycers do not always show up properly via jabber client + MUC
|
||||
|
||||
|
@ -273,8 +273,16 @@ jabberMsg(XMLNode node) {
|
||||
monitor_report("_error_unknown_host",
|
||||
sprintf("%O sent us a dialback packet believing we would be %O",
|
||||
source, target));
|
||||
emit(sprintf("<db:result from='%s' to='%s' type='error'>"
|
||||
"<error type='cancel'>"
|
||||
"<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>"
|
||||
"</error>"
|
||||
"</db:result>",
|
||||
target, source));
|
||||
/* no more...
|
||||
STREAM_ERROR("host-unknown", "")
|
||||
remove_interactive(ME);
|
||||
*/
|
||||
return;
|
||||
}
|
||||
// dialback without dial-back - if the certificate is valid and the sender
|
||||
@ -342,8 +350,16 @@ jabberMsg(XMLNode node) {
|
||||
*/
|
||||
// same as above...
|
||||
unless (is_localhost(lower_case(target))) {
|
||||
emit(sprintf("<db:verify from='%s' to='%s' id='%s' type='error'>"
|
||||
"<error type='cancel'>"
|
||||
"<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>"
|
||||
"</error>"
|
||||
"</db:result>",
|
||||
target, source, node["@id"]));
|
||||
/*
|
||||
STREAM_ERROR("host-unknown", "")
|
||||
QUIT
|
||||
*/
|
||||
}
|
||||
valid = node[Cdata] == DIALBACK_KEY(node["@id"], source,
|
||||
target);
|
||||
@ -546,6 +562,7 @@ open_stream(XMLNode node) {
|
||||
#ifdef XMPP_BIDI
|
||||
packet += "<bidi xmlns='urn:xmpp:features:bidi'/>";
|
||||
#endif
|
||||
packet += "<dialback xmlns='urn:xmpp:features:dialback'><errors/></dialback>";
|
||||
packet += "</stream:features>";
|
||||
} else {
|
||||
packet += ">";
|
||||
|
Loading…
Reference in New Issue
Block a user