1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

356 Commits

Author SHA1 Message Date
James Booth
a4f6e9391c Reassign stanza name when looking for field values 2014-09-06 23:23:23 +01:00
James Booth
2599c43d66 Rewrite form parser 2014-09-06 22:40:57 +01:00
James Booth
157a1b5ff7 Created form module 2014-09-05 21:04:16 +01:00
James Booth
9728d1a727 Debug room config form fields 2014-09-05 13:48:53 +01:00
James Booth
5e1023dfd9 Parse data form for room configuration 2014-09-04 23:15:51 +01:00
James Booth
763356464a Added ID handler for room config form 2014-09-04 22:41:10 +01:00
James Booth
1e0e5597c2 Added /room config edit and /room config cancel 2014-09-04 22:29:57 +01:00
James Booth
bf283652f8 Fix room config check for servers that don't send 110 status 2014-09-04 20:17:39 +01:00
James Booth
4ba33cb13c Added /ping command 2014-09-04 01:08:10 +01:00
James Booth
b50b786dcc Validate usage of /room config command, added UI messages 2014-09-03 22:56:33 +01:00
James Booth
64521eb135 Handle /room config cancel 2014-09-03 22:00:08 +01:00
James Booth
aa9f1dfa06 Send room destroy iq on /room config cancel 2014-09-03 20:29:17 +01:00
James Booth
09c10f62f2 Send instant room request 2014-09-03 13:55:06 +01:00
James Booth
57effcd504 Show message when room requires config 2014-09-03 00:23:04 +01:00
James Booth
15fe590eda Removed bookmarks todo 2014-08-31 23:11:30 +01:00
Dariusz Dwornikowski
1dcc028a71 Small spelling fixes in code and comments 2014-08-27 13:26:11 +02:00
James Booth
f9737251a6 Added license exemption for OpenSSL to source headers 2014-08-24 20:57:39 +01:00
Jan Hacker
e87eb4c40e "/bookmark add foo" crash - fix
A user providing an invalid JID when creating a new bookmark (like 'foo')
would reproducibly crash/segfault profanity, as it insists on checking
string length behind the @ of the JID. However, it could be NULL
if the user accidentally omitted it.
The patch avoids the crash by NULL-checking and prevents
getting there in the first place by checking the argument to "add".
Backtrace of unpatched profanity with above command:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff85699732 in strlen ()
(gdb) bt
 #0  0x00007fff85699732 in strlen ()
 #1  0x00000001000965d2 in xmpp_strdup ()
 #2  0x0000000100095d6d in xmpp_stanza_set_attribute ()
 #3  0x0000000100011c5c in _send_bookmarks ()
 #4  0x00000001000115a8 in _bookmark_add ()
 #5  0x000000010003320d in cmd_bookmark ()
 #6  0x000000010002a0f2 in cmd_execute ()
 #7  0x0000000100003a1d in process_input ()
 #8  0x00000001000037c7 in prof_run ()
 #9  0x0000000100045032 in main ()
(gdb)
2014-08-17 22:22:12 +02:00
Dariusz Dwornikowski
225312802e Spelling errors fixed and hyphenation used as minus sign fixed 2014-08-11 18:54:20 +02:00
James Booth
954661e59e Added quote param to autocomplete_complete 2014-07-09 20:23:47 +01:00
James Booth
6483bc8d7c Removed string allocation in stanza when joining room 2014-06-15 22:26:28 +01:00
James Booth
1c62d7fda8 Renamed generate_unique_id -> create_unique_id 2014-06-15 21:49:34 +01:00
James Booth
efc833a202 Free string after use in sending caps response 2014-06-15 21:39:54 +01:00
James Booth
c9274a38b2 Free jabber_conn.log 2014-06-15 21:19:53 +01:00
James Booth
d6d714e1ed Free saved account details before replacing 2014-06-15 21:00:01 +01:00
James Booth
d181f500ea Fixed usages of get_unique_id to free result 2014-06-15 20:56:24 +01:00
James Booth
ccf5cb846b Added connection details to jabber_shutdown 2014-06-15 20:46:12 +01:00
James Booth
4d0566b5d1 Fixed memleak in _available_handler 2014-06-15 20:39:50 +01:00
James Booth
92837ec186 Renamed sha1 functions to avoid naming clashes 2014-06-15 19:08:18 +01:00
James Booth
b25b3f3180 Added notification setting for typing in current window 2014-05-24 21:13:33 +01:00
James Booth
b85fd5e78c Use account muc_nick when no nick for bookmark 2014-05-23 00:55:30 +01:00
James Booth
d2662a6f17 Refactored bookmarks to use option parser, allow bookmarking rooms with passwords 2014-05-10 00:50:43 +01:00
James Booth
143c5a3493 Refactroed self presence checks, handle null stanzas
Issue #341
2014-05-06 22:07:44 +01:00
James Booth
ba8d1325ad Added null check for presence error stanza namespace element
Issue #341
2014-05-05 22:01:27 +01:00
James Booth
524b1f2383 Changed to use gnutls instead of openssl for sha1 hashing 2014-05-01 22:18:04 +01:00
James Booth
d6e92f62dc Fixed cppcheck warnings 2014-04-26 00:36:36 +01:00
James Booth
4384a1f468 Tidied jabber_process_events 2014-04-23 20:51:57 +01:00
James Booth
1a0f12b0e6 Merge remote-tracking branch 'lucian/master' 2014-04-22 23:53:15 +01:00
James Booth
2c15aba92a Chat room windows now created only after successful join 2014-04-21 00:37:04 +01:00
James Booth
9a55d8ad19 Store password with room 2014-04-20 22:02:55 +01:00
lightb
1ceca89296 Added some otr policy functionality, if policy is set to "always"
if otr_is_secure fails, the message will not be sent.

Changed both cmd_msg and cmd_execute_default
2014-04-19 05:08:33 -04:00
James Booth
bf185d9907 Added simple stanza logging to main console 2014-04-15 01:08:41 +01:00
James Booth
bc6f8ceb3a Fixed handling of room subject 2014-04-13 03:11:46 +01:00
James Booth
f332b6681e Fixed "/bookmark remove" for disabling autojoin
Issue #194
2014-04-13 02:27:37 +01:00
James Booth
f62cf772a7 Refactored bookmark_remove
Issue #194
2014-04-13 02:05:12 +01:00
James Booth
73c146c65a Implemented "/bookmark remove" for private storage
Issue #194
2014-04-13 01:39:54 +01:00
James Booth
f7daaf0953 Clean up after removing bookmark
Issue #194
2014-04-13 01:11:21 +01:00
James Booth
5bb3fab17c Implemented "/bookmark add" for private storage
Issue #194
2014-04-13 01:01:53 +01:00
James Booth
aa2a87d162 Tidied ui dependencies 2014-04-06 21:35:17 +01:00
James Booth
8f7bdc3c2e Switch back to storage for muc bookmarks 2014-03-29 23:15:51 +00:00
James Booth
7e27d96f16 Revert "Commented bookmarks code for 0.4.0 release"
This reverts commit 8306d4c244.
2014-03-29 22:58:48 +00:00
James Booth
8306d4c244 Commented bookmarks code for 0.4.0 release 2014-03-16 18:20:31 +00:00
James Booth
26726b207a Updated copyright 2014-03-09 01:18:19 +00:00
James Booth
b177250f47 Refactored muc_room_is_active to only take room, rather than full jid 2014-03-08 21:20:26 +00:00
James Booth
dd1ee18c72 Added test for /join with nick option 2014-03-08 21:10:23 +00:00
Dmitry Podgorny
0fbaa6f5ee fixed build error when make run with -jN option
Race can occur when gitversion file isn't fully generated before
it is used.
2014-03-06 02:06:22 +02:00
Kristofer M White
ced6e7f411 Making whitespace consistently spaces, not tabs 2014-02-27 05:40:31 +00:00
Kristofer M White
8a54c5895d Adding password handling for joining chatrooms 2014-02-27 05:31:10 +00:00
James Booth
3e02921859 Removed id from bookmarks add 2014-02-03 19:35:26 +00:00
James Booth
9394091f04 Implemented add bookmark for XEP-0223
Issue #194
2014-02-02 02:39:36 +00:00
James Booth
95c48a0f47 Test message when removing autojoin for non existent bookmark 2014-02-02 01:05:52 +00:00
James Booth
9d957e5f93 Show message on /bookmark remove when bookmark does not exist 2014-02-02 00:59:32 +00:00
James Booth
92b85bb7f1 Added message when bookmark updated 2014-02-02 00:49:02 +00:00
James Booth
12666b41e6 Refactored handle_presence_error, removed no longer used functions 2014-01-30 22:20:57 +00:00
James Booth
2cd24a484a Renamed handle_error_message -> handle_presence_error 2014-01-30 21:43:31 +00:00
James Booth
5afb296e67 Moved error handling logic to server_events 2014-01-28 22:37:50 +00:00
James Booth
c3ea8f8d0b Added generated id's to presence stanzas 2014-01-28 20:55:02 +00:00
James Booth
e9959d5d38 Refactored presence_error_handler 2014-01-27 22:35:04 +00:00
James Booth
27293ebbc2 Added fallback message error handlers 2014-01-27 22:09:16 +00:00
James Booth
678a5bd05c Fixed comment 2014-01-27 21:48:44 +00:00
James Booth
da94dcf3cf Moved connection_error_handler to _presence_error_handler 2014-01-27 21:42:34 +00:00
James Booth
f26686aeca Removed unnecessary strdup 2014-01-27 21:33:02 +00:00
James Booth
1a300ce7d3 Show original error message 2014-01-26 22:50:22 +00:00
James Booth
50f1a5ecc0 Changed error message when couldn't join room 2014-01-26 22:19:22 +00:00
James Booth
292ae567aa Handle recipient not found 2014-01-26 18:30:34 +00:00
James Booth
46b3ff6f44 Added generated id to chat state stanzas 2014-01-26 14:15:04 +00:00
James Booth
7184c34d30 Added generated id to invites 2014-01-26 14:10:45 +00:00
James Booth
ae1ccc7bae Add generated id to messages 2014-01-26 01:07:11 +00:00
James Booth
16de267906 Added id handler for pings, disable ping on error type 'cancel' 2014-01-26 00:53:24 +00:00
James Booth
3d7e923254 Use generated id on ping iqs 2014-01-26 00:18:15 +00:00
James Booth
5472c6965a Moved xmpp ping to iq module 2014-01-26 00:15:34 +00:00
James Booth
fbdecdad0c generate_unique_id allows prefix 2014-01-25 23:18:10 +00:00
James Booth
e1aca3b1f6 Add message and presence error handlers seperately 2014-01-25 22:57:53 +00:00
James Booth
9b82551809 Renamed iq handlers 2014-01-25 21:41:17 +00:00
James Booth
8600efa55b Renamed _room_presence_handler -> _muc_user_handler 2014-01-25 21:29:17 +00:00
James Booth
6a15a09ed7 Renamed xmpp roster handlers 2014-01-25 21:25:35 +00:00
James Booth
d8a92f933b Split xmpp message handlers by namespace 2014-01-25 21:20:56 +00:00
James Booth
78e8232b61 Renamed namespace variables 2014-01-25 20:47:32 +00:00
James Booth
aada6d5cd6 Don't show error for initial bookmarks request 2014-01-25 17:18:30 +00:00
James Booth
39e0782da8 Fixed test compilation 2014-01-18 20:34:46 +00:00
James Booth
e7013408e5 WIP - Adding port to account options 2014-01-18 01:45:05 +00:00
James Booth
db973457d0 Refactored roster add/update 2014-01-05 23:54:29 +00:00
James Booth
b8672d709a Moved roster handlers to server_events 2014-01-05 21:55:32 +00:00
James Booth
4bcd766d34 Moved presence handlers to server_events 2014-01-05 21:48:04 +00:00
James Booth
a54518f2d4 Moved messages handlers to server_events 2014-01-05 21:33:12 +00:00
James Booth
d083a5407d Moved handle_room_list and handle_disco_items to server_events 2014-01-05 21:20:15 +00:00
James Booth
b14d5707cb Moved handle_disco_info to server_events 2014-01-05 21:17:07 +00:00
James Booth
460a42c7c9 Moved handle_software_version_result to server_events 2014-01-05 21:11:09 +00:00
James Booth
42fd1fb13e Moved handle_lost_connection and handle_failed_login to server_events 2014-01-05 21:04:30 +00:00
James Booth
da03617e8b Moved handle_login_account_success to server_events 2014-01-05 20:58:19 +00:00
James Booth
87cdbe015a Added server_events.c 2014-01-05 20:52:45 +00:00
James Booth
4a8d6c2153 Renamed roster_add_new -> roster_send_add_new 2014-01-05 20:33:48 +00:00
Jasper van Bourgognie
7127a934c7 Fixed types of presence variables to resource_presence_type (avoid useless and implicit casts) 2013-12-27 20:50:43 +01:00
James Booth
6a9bb8ea11 Bind roster functions in main.c 2013-12-22 23:34:44 +00:00
James Booth
4e169689f6 Bind presence functions in main.c 2013-12-22 23:31:49 +00:00
James Booth
74e8a405d6 Bind message functions in main.c 2013-12-22 23:25:30 +00:00
James Booth
90e7ce1c56 Bind iq functions in main.c 2013-12-22 23:19:20 +00:00
James Booth
e818a6772b Bind capabilities functions in main.c 2013-12-22 23:16:19 +00:00
James Booth
c001f0e7cb Bind bookmark functions in main.c 2013-12-22 23:13:34 +00:00
James Booth
581f58e47f Bind jabber functions in main.c 2013-12-22 23:13:05 +00:00
James Booth
81909ef000 Dynamically bind xmpp module api 2013-12-18 20:16:55 +00:00
James Booth
107fdd355e Added simple mock test, refactored roster 2013-12-14 15:34:17 +00:00
James Booth
c5f76721ce Fixed compile error for -Wduplicate-decl-specifier on OSX 2013-11-10 18:48:55 +00:00
Tomás Senart
480589f0ae Use passwords from the accounts file
This commit makes it so that if the password in an account in the
accounts file is present, then use it. Otherwise ask for the password to
the user.
2013-10-14 20:15:51 +02:00
James Booth
d70245c887 Fixe rejoining room after nickname conflict
fixes #241
2013-09-22 01:26:40 +01:00
James Booth
d0c8ed462d Add error handler only once
fixes #240
2013-09-22 00:19:11 +01:00
James Booth
ee8ff948bf Use git revision in development strings 2013-09-17 01:28:35 +01:00
James Booth
70bbc2e344 Merge remote-tracking branch 'dmitry/fixes' 2013-08-26 14:49:47 +01:00
Dmitry Podgorny
7a9fcd53d2 fixed crash because of incorrect string releasing 2013-08-26 12:31:41 +03:00
Dmitry Podgorny
545a23e92f removed strdup in autocomplete calls 2013-08-26 03:29:50 +03:00
Dmitry Podgorny
32e18fb1a5 remove octet_compare
strcmp provides the same functionality
2013-08-26 02:42:01 +03:00
Dmitry Podgorny
b1bfdf650a fixed memory leaks in various files 2013-08-25 14:54:34 +03:00
Dmitry Podgorny
c7ec06ff65 removed strdup from g_string_append 2013-08-25 14:52:25 +03:00
Dmitry Podgorny
d6c90ac7ca fixed indenting 2013-08-24 00:41:57 +03:00
Dmitry Podgorny
012366cf13 fixed memleak in _iq_handle_discoinfo_get 2013-08-24 00:40:23 +03:00
James Booth
6651b13bd0 Merge branch 'master' into nextdev 2013-08-05 23:18:19 +01:00
James Booth
42eef398b4 Free Jid 2013-08-05 23:12:10 +01:00
James Booth
c6e9a7455d Undo change to stanza check for nick change return value 2013-08-05 23:08:30 +01:00
James Booth
1525be6133 Refactor MUC self presence checks 2013-08-05 22:55:11 +01:00
James Booth
55282e063d Handle when servers dont send status 101 or jid for MUC nick changes 2013-08-05 21:20:07 +01:00
Dmitry Podgorny
a6e66cc571 fixed memory leaks
Also avoided several NULL pointer dereferences.
2013-08-03 14:38:38 +03:00
Dmitry Podgorny
0346fda0b3 most FREE_SET_NULL replaced with free
FREE_SET_NULL makes extra assignment of NULL for pointers in stack or
dynamic memory that is going to be freed.
FREE_SET_NULL is useful for pointers that can be used in future.
2013-08-03 14:27:07 +03:00
James Booth
66238641e0 Merge branch 'master' into nextdev 2013-07-22 22:09:51 +01:00
James Booth
a64b293878 Removed escaping XML as handled by libstrophe
4ad21c9283
2013-07-22 20:35:43 +01:00
James Booth
7906bd6a9d Bookmarks: Move stanza pointer on in loop, check for autojoin "true" 2013-07-15 00:52:47 +01:00
Dmitry Podgorny
b9d29e9aa5 draft of bookmarks implementation
'/bookmark add' and '/bookmark remove' ain't finished
2013-07-14 23:58:02 +03:00
Dmitry Podgorny
6e23584575 improved autojoin logic
Delete id handler after timeout (5sec) if response isn't received
Auto join maximum 5 conferences
2013-07-14 17:08:49 +03:00
Dmitry Podgorny
ccbbd16d5f Merge branch 'master' into bookmarks 2013-07-14 13:50:57 +03:00
Dmitry Podgorny
034cf730cc use get_unique_id for bookmarks 2013-07-14 13:49:50 +03:00
James Booth
581c1e8b95 Coloured contact and subscription in /roster and /group output 2013-07-03 23:44:51 +01:00
Dmitry Podgorny
2837c4054f initial support of autojoin for MUC 2013-06-30 18:59:38 +03:00
James Booth
2077834b10 Changed client type to 'console' as per http://xmpp.org/registrar/disco-categories.html#client 2013-06-25 01:00:24 +01:00
James Booth
d5e9ca649d Show messages on /group add and /group remove
closes #189
closes #190
2013-06-23 17:38:30 +01:00
James Booth
dace47e5d3 Show message when removing contact from group when not in group 2013-06-23 16:35:13 +01:00
James Booth
265fff8f40 Show message when contact already in group 2013-06-23 16:29:42 +01:00
James Booth
b9fc61fd30 Moved stophe references in message send 2013-06-20 17:41:44 +01:00
James Booth
96496ca219 Merge remote-tracking branch 'dmitry/captcha-2' into captcha 2013-06-16 18:58:18 +01:00
Dmitry Podgorny
1f207beb99 fixed memory leaks in presence.c 2013-06-09 18:52:28 +03:00
Dmitry Podgorny
c84cb17bd4 added support of captcha in a MUC 2013-06-09 16:19:49 +03:00
Dmitry Podgorny
eff5986d38 fixed several memory leaks
And infinity loop in stanza_destroy_form().
2013-06-09 14:20:48 +03:00