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
Shivaram Lingamneni
eb8b7606c3
add a test for SASL authentication failure
2021-03-01 01:25:03 -05:00
Shivaram Lingamneni
4d031b5bd0
refactor callback/protocol handling
...
1. Change internal representation of callbacks
2. Add AddConnectCallback
3. Parse 005 RPL_ISUPPORT and expose to the client
4. Support CAP LS 302
2021-03-01 01:03:43 -05:00
Shivaram Lingamneni
a1973eec96
Merge pull request #40 from slingamn/no_callback_timeout
...
remove support for CallbackTimeout
2021-02-23 18:18:04 -05:00
Shivaram Lingamneni
cd0bb497ee
remove support for CallbackTimeout
2021-02-23 16:36:47 -05:00
Shivaram Lingamneni
8d38e43fc6
Merge pull request #39 from slingamn/safety_again.1
...
increased validation of incoming and outgoing messages
2021-02-22 19:54:29 -05:00
Shivaram Lingamneni
18f4dccb97
validate outgoing message tag content
2021-02-22 19:30:40 -05:00
Shivaram Lingamneni
3d28146f7d
be more strict about parsing lines with \r and \n
2021-02-22 19:30:31 -05:00
Shivaram Lingamneni
6e139f6c42
Merge pull request #37 from slingamn/safety.1
...
fix #36
2021-02-21 20:09:59 -05:00
Shivaram Lingamneni
27a39aed1f
add some more assembly tests
2021-02-21 17:36:50 -05:00
Shivaram Lingamneni
0f44346fcf
fix ircevent tests to emit compliant messages
2021-02-21 17:07:57 -05:00