Commit Graph

544 Commits

Author SHA1 Message Date
kayos@tcp.direct 8d83469597 do it fo 'da mod 2021-12-19 14:17:08 -08:00
kayos@tcp.direct c6e5a087ef fix go module path 2021-12-19 14:15:11 -08:00
Shivaram Lingamneni 0e1b7ad1b9 add some trailing parameter parsing tests 2021-10-03 17:41:24 -04:00
Shivaram Lingamneni dd73c4f862 update project name 2021-08-09 10:17:20 -04:00
Shivaram Lingamneni d6a5f43c67 ircevent: allow KeepAlive to equal Timeout 2021-08-04 23:07:50 -04:00
Shivaram Lingamneni 0eddd4ae17
Merge pull request #65 from slingamn/initialization
ircevent: allow send calls before first connect
2021-07-23 18:04:53 -04:00
Shivaram Lingamneni 9f427b3fd4 ircevent: allow send calls before first connect 2021-07-23 17:51:05 -04:00
Shivaram Lingamneni 256f1601d3
Merge pull request #63 from slingamn/references.1
remove ircmap and gircclient, rename to ergochat/irc-go
2021-06-17 18:22:58 -04:00
Shivaram Lingamneni 7b3bb1d1ea remove ircmap and gircclient, rename to ergochat/irc-go 2021-06-17 16:51:48 -04:00
Shivaram Lingamneni f5e0f875f7
Merge pull request #61 from goshuirc/timeouts
ircevent: avoid uses of time.After
2021-05-10 13:33:24 -04:00
Shivaram Lingamneni a16267c773 ircevent: avoid uses of time.After
"The underlying Timer is not recovered by the garbage collector until the
timer fires. If efficiency is a concern, use NewTimer instead and call
Timer.Stop if the timer is no longer needed."
2021-05-10 09:14:58 -04:00
Shivaram Lingamneni de8a22cda2
Merge pull request #60 from slingamn/ircevent_truncation
fix #59, add a message sanitizer
2021-04-23 11:41:42 -04:00
Shivaram Lingamneni 97bbb1c210 ircutils: add SanitizeText 2021-04-23 11:30:37 -04:00
Shivaram Lingamneni 4b81d501cc ircevent: add AllowTruncation 2021-04-23 11:14:48 -04:00
Shivaram Lingamneni 722fe286c9
Merge pull request #56 from slingamn/readme_update
update the readme to reflect near-term direction
2021-04-19 09:52:30 -04:00
Shivaram Lingamneni 9dd633a934 reorder subpackages in the list 2021-04-19 09:45:06 -04:00
Shivaram Lingamneni da91d6716f link to titlebot 2021-04-19 08:52:00 -04:00
Shivaram Lingamneni 62a46fadbc update the readme to reflect near-term direction 2021-04-19 08:48:57 -04:00
Shivaram Lingamneni bdc2c2cd2f
Merge pull request #54 from slingamn/utf8_truncate
add UTF8-safe truncation utility function
2021-03-18 03:45:29 -04:00
Shivaram Lingamneni debcdc124d add UTF8-safe truncation utility function 2021-03-18 03:43:31 -04:00
Shivaram Lingamneni f3d1c7c294
Merge pull request #53 from slingamn/datarace.1
fix #52
2021-03-17 02:24:30 -04:00
Shivaram Lingamneni 7612702f6e fix #52
Fix data race on (*Connection).batchNegotiated
2021-03-17 01:40:03 -04:00
Shivaram Lingamneni ea7a188a73
Merge pull request #51 from slingamn/noevent.2
rename to Message and Reader; remove Event
2021-03-10 19:43:46 -05:00
Shivaram Lingamneni 5dda03b554 clean up some event-related language 2021-03-10 19:15:58 -05:00
Shivaram Lingamneni 23a3bb8f66 rename to Message and Reader; remove Event 2021-03-10 18:08:37 -05:00
Shivaram Lingamneni 4d7631f681
Merge pull request #50 from slingamn/label.4
support batch and labeled-response
2021-03-10 14:19:25 -05:00
Shivaram Lingamneni 8f78fbb4a2 don't accept regular callbacks for BATCH 2021-03-10 14:07:24 -05:00
Shivaram Lingamneni b26cd91715 tweak force-expiration behavior 2021-03-10 14:05:12 -05:00
Shivaram Lingamneni 05d8f44198 clean up synchronization in tests 2021-03-10 13:22:31 -05:00
Shivaram Lingamneni b2a42a4234 make sure non-label batches expire as well 2021-03-10 12:43:23 -05:00
Shivaram Lingamneni 6d11cde149 explain HandleBatch and HandleEvent 2021-03-10 02:32:02 -05:00
Shivaram Lingamneni e9d62eeee7 support batch and labeled-response 2021-03-10 02:21:53 -05:00
Shivaram Lingamneni cf78e9176f
Merge pull request #49 from slingamn/truncation_again
restore message truncation in ParseLineStrict
2021-03-03 22:15:53 -05:00
Shivaram Lingamneni 3f429682a8 restore message truncation in ParseLineStrict
Truncation was removed in 3fafe19ebb. This was reconsidered and found
to be potentially dangerous, since it exposes server implementations to parsed
parameters longer than 512 bytes.

This commit does the following:

1. Restores truncation
2. Reverts the test changes
3. Retains ErrorBodyTooLong as a non-fatal error reported during truncation
2021-03-03 21:59:04 -05:00
Shivaram Lingamneni 78fec0a07e
Merge pull request #45 from slingamn/utf8_truncation.1
ircmsg: make truncation utf8-safe
2021-03-03 14:23:43 -05:00
Shivaram Lingamneni 3fafe19ebb don't actually truncate the line when parsing
We have the data, might as well interpret it (and return the new non-fatal
error). It's the line reader's job to prevent us from consuming excess data.
2021-03-03 11:26:38 -05:00
Shivaram Lingamneni 9f8a43331a
Merge pull request #47 from slingamn/fail
add error prints for standard replies
2021-03-03 01:54:02 -05:00
Shivaram Lingamneni 99e8908309 remove ircmatch from readme 2021-03-03 01:42:06 -05:00
Shivaram Lingamneni dc67fb1e17 add error prints for standard replies 2021-03-03 01:36:19 -05:00
Shivaram Lingamneni 617723503e expose message truncation in the API
ErrorInputTooLong has been split into ErrorTagsTooLong (fatal)
and ErrorBodyTooLong (non-fatal, returns a truncated message).
2021-03-03 01:02:36 -05:00
Shivaram Lingamneni 61e3317dd1 add tests for UTF8-safe truncation 2021-03-02 20:51:44 -05:00
Shivaram Lingamneni 0c71162327 Make truncation UTF8-safe
We should never truncate in the middle of a UTF8 codepoint.
Enabling this unconditionally, since truncation is most likely
implementation-defined.
2021-03-02 20:51:44 -05:00
Shivaram Lingamneni d39993c074
Merge pull request #44 from slingamn/newline_trim
IRCReader: trim \r if the line ending was \r\n
2021-03-01 18:47:05 -05:00
Shivaram Lingamneni 98ea36235a IRCReader: trim \r if the line ending was \r\n
For parity with (*bufio.Reader).ReadLine(), which does the same
2021-03-01 17:55:05 -05:00
Shivaram Lingamneni 2c4b83d648
Merge pull request #43 from goshuirc/ircreader_bug
fix an edge case in IRCReader
2021-03-01 17:54:36 -05:00
Shivaram Lingamneni a1d30e7a26
Merge pull request #42 from slingamn/isupport_and_302.1
refactor callback/protocol handling
2021-03-01 16:56:28 -05:00
Shivaram Lingamneni 6d3e2a0e24 add a regression test 2021-03-01 16:43:30 -05:00
Shivaram Lingamneni 915eacc79e fix an edge case in IRCReader
We were spuriously detecting a full buffer in the case where
the buffer has been expanded to its maximum size, but is not
actually full of data. An excellent find from @ProgVal!
2021-03-01 16:43:30 -05:00
Shivaram Lingamneni 4954891ab6 don't wake up Connect() until after the MOTD 2021-03-01 02:48:21 -05:00
Shivaram Lingamneni 4992421a60 factor out magic number 2021-03-01 02:21:11 -05:00