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 3fafe19ebbebed. 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
Shivaram Lingamneni
e489a564c1
fix #36
...
Outgoing messages were not being properly validated for \r and \n
2021-02-21 17:03:44 -05:00
Shivaram Lingamneni
7516151d4c
remove indirections in examples
2021-02-20 23:12:43 -05:00
Shivaram Lingamneni
c8d87a2fa8
Merge pull request #35 from slingamn/example_update
...
update examples, run gofmt
2021-02-19 12:14:47 -05:00
Shivaram Lingamneni
5167dfab9c
fail SASL tests if no environment variables set
2021-02-19 12:03:16 -05:00
Shivaram Lingamneni
a4b4bd8155
update examples, run gofmt
2021-02-19 11:45:33 -05:00
Shivaram Lingamneni
45eac0cc6e
Merge pull request #33 from slingamn/ircevent_integration.8
...
add new ircevent package
2021-02-19 04:10:12 -05:00
Shivaram Lingamneni
dc36bd80a6
initial fixes and refactoring
2021-02-19 03:55:06 -05:00
Shivaram Lingamneni
9d5dccb821
Merge file:///~/workspace/go-ircevent into ircevent_integration
2021-02-15 21:59:55 -05:00
Shivaram Lingamneni
3e23f7f884
move to ircevent subdirectory
2021-02-15 21:58:48 -05:00
Shivaram Lingamneni
171e08b1d4
remove go.mod and go.sum
2021-02-15 21:57:42 -05:00
Shivaram Lingamneni
14cd697c0c
Merge pull request #31 from slingamn/rename
...
rename IrcMessage to IRCMessage
2021-02-15 11:24:35 -05:00
Shivaram Lingamneni
dfb963d463
rename IrcMessage to IRCMessage
2021-02-15 11:23:09 -05:00
Shivaram Lingamneni
9d703e6ac3
Merge pull request #30 from slingamn/packagename
...
fix package name for ircreader
2021-02-13 20:51:42 -05:00
Shivaram Lingamneni
6650d11315
fix package name for ircreader
2021-02-13 20:50:52 -05:00
Shivaram Lingamneni
fcaabd19f3
Merge pull request #29 from slingamn/ircreader.1
...
add ircreader
2021-02-13 19:58:48 -05:00
Shivaram Lingamneni
cd9cd8d55f
add ircreader
2021-02-13 19:57:21 -05:00
Daniel Oaks
ec778d0252
Merge pull request #28 from slingamn/greedy
...
fix greedy matching of bracketed escapes
2021-01-08 22:41:56 +10:00
Shivaram Lingamneni
dc3b93380a
fix greedy matching of bracketed escapes
2021-01-06 16:48:14 -05:00
Daniel Oaks
4e36cb3f41
Merge pull request #27 from slingamn/panic.2
...
fix panic in ircfmt.Unescape
2020-12-28 10:25:32 +10:00
Shivaram Lingamneni
40ec850478
accept numeric codes in brackets
2020-12-21 17:09:44 -05:00
Shivaram Lingamneni
d9d11e8600
fix panic in ircfmt.Unescape
2020-12-21 02:08:38 -05:00