| Commit message (Collapse) | Author | Age | Lines |
... | |
|
|
|
|
|
| |
Passing NULL as the "fd" and 0 as the error. The callback is
yahoo_connected() in libyahoo2.c, and with those parameters all it does
is freeing the data parameter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes trac ticket 135, https://bugs.bitlbee.org/bitlbee/ticket/135
The ticket mentions 100% cpu usage when failing to connect to a socks
proxy. It also provides a patch that just checks source == -1 and
disconnects cleanly instead of trying to continue logging in.
This commit is pretty much the same thing, adapted to the API we're
currently using, since the original patch was for bitlbee 1.0.1 and it
looks like the old api was terrible back then.
That ticket was almost 10 years old. The yahoo code didn't change a lot
in that time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes trac ticket 1143: https://bugs.bitlbee.org/bitlbee/ticket/1143
The "correct" way to discover XEP85 support is to send a discovery
query. We take a more conservative approach: if the irc client claims to
support typing (by sending CTCP TYPING at least once), we send an
<active> tag along with next chat message, and set JBFLAG_PROBED_XEP85.
The logic for that stuff is in jabber_buddy_msg().
That's all neat and clever and actually works fine. What was broken was
the detection side. Whenever a <composing>, <active> or <pause> is
received, the buddy is marked as supporting XEP85. However the <active>
tag had an additional check:
/* No need to send a "stopped typing" signal when there's a message. */
else if (xt_find_node(node->children, "active") && (body == NULL)) {
It skipped the tag completely if it had a message too.
This was changed to move the body == NULL condition inside, so that the
flag is set.
Took me longer to write this message than the diff itself. But even
longer to actually decide to debug this behavior. I'm the one who
submitted that ticket, one year and a half ago. Yep.
|
|
|
|
|
|
|
|
|
|
|
| |
Since bare JIDs from typing notifications are now accepted, the other
buddy objects never get the flag JBFLAG_DOES_XEP85 set. This fixes it by
checking both the buddy with resource and the bare one, with the
implication that if the bare JID has that flag, all other resources get
typing notifications.
Follow up to the previous commit, splitting since they are actually
unrelated fixes, although this one is a consequence of the previous one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jabber_buddy_by_jid() does the following:
head = g_hash_table_lookup(jd->buddies, jid);
bud = (head && head->next) ? head->next : head;
'head' has the one without resource, 'bud' has the first resource.
So if a resource is available, it uses it and ignores the head.
When asked for a bare JID (with no resource) and GET_BUDDY_EXACT, it
shouldn't do this, but it should return the head.
In other words, the problem was a message in this format:
<message from="username@gmail.com" ...>
Instead of
<message from="username@gmail.com/resource" ...>
This only deals with incoming typing notifications. See next commit.
|
|
|
|
| |
That includes location blocked and incorrect password.
|
|
|
|
|
|
|
| |
This is what the 'howtofixmsn' wiki page addressed, which has a very
generic name because it's one of the first msn issues that appeared when
we thought it was dying. Since it's just a security measure, it still
appears when people log in from unusual locations.
|
|
|
|
| |
Fixes trac ticket 1089, https://bugs.bitlbee.org/bitlbee/ticket/1089
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, the bee_chat_by_title() call just failed when
receiving a message in a groupchat we didn't know about, which is
probably something skype broke in their api at some point.
I'm fixing this since apparently the only way to access p2p based chats
is through the official skype desktop client (they won't be supported
through msnp24 or skypeweb. It's broken in mobile clients already), so
this plugin is probably the best way to access those.
This breaks the 'msg' test - now all chats are groupchats and there's no
way to tell them apart.
However, in reality, private messages aren't delivered at all over the
api, or at least I never managed to get them working. Probably if you
talk with someone who has a very old patched skype client.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The diff might look confusing - it's just removing the last hex digit of
each channel name in the groupchat tests.
This broke in several ways over the years. I know because i've been
bisecting the last few hours and found lots of different issues.
All of them except this one were fixed already
This one is probably a side effect of the new irc channel name
generation code that includes the # as part of the string and reuses the
nick code. Or maybe not exactly that, but something similar. I'm not
going to bisect any further, had enough for today.
|
|
|
|
| |
Forgot to change this after b39859e
|
|
|
|
|
|
| |
More prefixes = better. The G stands for "good".
(it also fixes the warning about _BSD_SOURCE being deprecated)
|
|
|
|
|
| |
Found the thing using 100% cpu because of a dead connection that it
didn't want to bury.
|
|
|
|
|
|
| |
Mostly minor rare leaks that happen in error conditions, and one
dereference before null check in twitter_logout (the null check is
probably the wrong one there, but it doesn't hurt to keep it)
|
|
|
|
|
|
|
|
| |
Oddly enough it doesn't break. Maybe it overwrites the 'decoded' pointer
when it doesn't need it anymore? Fun stuff.
Also the version of gcc (5.2) i'm using doesn't complain about array
bounds, clang does, and the older gcc (4.6) in travis does too.
|
|
|
|
|
|
|
|
|
| |
Trac ticket 1229, https://bugs.bitlbee.org/bitlbee/ticket/1229
This one is complicated. See the trac ticket for details.
Relevant commits: cc20520 6963230 664bac3 - second one fixed the same
issue, third one reverted it, this one takes a different approach.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So use the second part as the username, and only require it to be equal
to the first part if that one is present.
ABNF from the spec:
message = [authzid] UTF8NUL authcid UTF8NUL passwd
Note brackets.
Authzid (authorization identity) is meant for impersonation, which we
don't support. The actual login username is defined by authcid
(authentication identity)
Thanks grawity for pointing this out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only plain, no other methods. We don't have built-in SSL to implement
EXTERNAL (certfp) and nothing else is worth implementing.
The actual authentication is pretty much like sending a server password
(when the server's authmode isn't closed), which means it happens in
cmd_identify, but this code also calls storage_check_pass() to send the
required success/failure replies.
SASL doesn't give us much benefit other than standards compliance, but
some clients might appreciate it.
And having a fifth way to do the same thing doesn't hurt! Now we have:
- identify in &bitlbee
- identify to nickserv (alias for root)
- 'nickserv' and 'ns' irc commands
- server password
- sasl plain
|
|
|
|
|
|
| |
Moving this was suggested during the review of the multi-prefix patch as
ordering the sets of status_prefix... and it seemed reasonable to me.
Thanks valgrind.
|
|
|
|
|
|
|
|
|
| |
We can't actually have multiple prefixes internally, so the only thing
missing for multi-prefix compliance is actually having the prefix in the
WHO reply, which is a rfc1459 thing.
Note to future self: check irc logs for the implementation I threw away.
The one that actually handled multiple prefixes. I hope that's useful.
|
|
|
|
|
|
|
|
|
| |
Check callback function supplied to http_dorequest and only run it if it is
not NULL.
While it is not the usual case there are some times when there is no need to
check the results of a http request. Using a NULL pointer is much more
convenient than creating noop functions.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
From coverity.
That g_strdup_printf() was really pointless, slightly ashamed we didn't
notice that in the review of the patch.
|
|
|
|
| |
From coverity.
|
|
|
|
| |
From coverity.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Mostly no-op for now. Puts registration on hold, supports the basic
commands, and NAKs everything
|
|
|
|
|
|
|
| |
This enables the use of bitlbee plugins in scenarios where there is no write access to the bitlbee lib/ directory.
One example is the NixOS linux distribution (which I'm currently packaging a bitlbee plugin for), where post-installation modification of a package (e.g. bitlbee) by another package (e.g. bitlbee-facebook) is not possible.
Another example would be a user without root access building and using a plugin with a system-provided (i.e. installed by root) bitlbee.
|
|
|
|
|
|
|
|
|
| |
* Added a configure option for sysroot.
* Prevent pkgconfig environment variables to be clobbered.
* Prevent PATH environment variable pollution.
* Backward compatible.
Signed-off-by: Guillermo A. Amaral <g@maral.me>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
First fallback to ASCII without TRANSLIT, and if that fails too, just
give up by returning NULL.
Basically the same thing as 3a27896 (a netbsd specific fix), but for
channel names. This wasn't needed before because the older version of
this code caught the NULL from the ASCII//TRANSLIT attempt and gave up
immediately, while the refactored version lacked null checking.
|
|
|
|
|
|
|
| |
- Look for a status message right inside <presence> (seen with ejabberd
as a result of a s2s connection error)
- Check status codes in a while loop, skipping unknown ones (such as
110, which means "Inform user that presence refers to itself")
|
|
|
|
|
|
|
|
|
|
|
| |
To simplify testing. Also allow passing a -1 as size to use strlen()
Minor behavior change: The jabber_init_iq_auth() branch can no longer
return immediately, which means it will continue through the
ssl_pending() check in jabber_read_callback().
Other than that, the size -1 change, and one indentation level less, the
function body is the same as before.
|
|
|
|
| |
Also add a couple of missing targets to .PHONY
|
|
|
|
|
|
| |
Can only happen once, and it's just ~200 bytes.
But being valgrind-clean is good.
|
|
|
|
|
|
| |
Because many other ircds do that.
(But actually mostly because @SaberUK said so)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes trac ticket 835, "an attacker can spoof color codes"
Which had "major" priority, and was open for a few years.
Yeah.
Every time I looked at that ticket I thought about lowering the
priority, but then saw that pesco opened the bug. Welp.
Anyway, it's gone now. Yay.
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes trac ticket 710.
Incoming messages can have newlines in them, which become several
PRIVMSG on the irc layer. Prepending color codes at the beginning of the
message resulted in showing the rest of those PRIVMSG as white.
This splits the message by newlines and rebuilds it in a GString,
re-adding the color codes right after each newline.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This means faster builds, which is something I don't really need
but I felt like doing this.
|
| |
|
| |
|
|\ |
|