View Issue Details

IDProjectCategoryView StatusLast Update
0005952unrealircdpublic2021-07-04 14:05
Reporterprogval Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Summary0005952: CHATHISTORY BETWEEN does not apply bounds the same way depending on order
DescriptionHi,

Given two timestamps (timestamp1 < timestamp2), these two commands:

* CHATHISTORY BETWEEN #channel timestamp=<timestamp1> timestamp=<timestamp2>
* CHATHISTORY BETWEEN #channel timestamp=<timestamp2> timestamp=<timestamp1>

do not return the same results; the latter also returns messages whose timestamp is equal to timestamp1
Steps To Reproducesend messages:

S -> C: @msgid=2Rw7IBLS3NPvHwWaXW5zpo;time=2021-07-04T10:37:08.025Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 0
C -> S: PRIVMSG ##chan :this is message 1
S -> C: @msgid=aYJ2I1m5PQ44w94LkqZRjZ;time=2021-07-04T10:37:08.028Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 1
C -> S: PRIVMSG ##chan :this is message 2
S -> C: @msgid=OtI3mgnEX9cvnFNN1HApm4;time=2021-07-04T10:37:08.032Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 2
C -> S: PRIVMSG ##chan :this is message 3
S -> C: @msgid=iC952TNKSra4djQbVqffRk;time=2021-07-04T10:37:08.035Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 3
C -> S: PRIVMSG ##chan :this is message 4
S -> C: @msgid=FOfbxJacqbfdZ3nPdS9CuT;time=2021-07-04T10:37:08.037Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 4

get messages forward:

C -> S: CHATHISTORY BETWEEN ##chan timestamp=2021-07-04T10:37:08.025Z timestamp=2021-07-04T10:37:08.037Z 10
S -> C: :My.Little.Server BATCH +2KZ8YggHOvz2nk0Y1f9LaJ chathistory ##chan
S -> C: @batch=2KZ8YggHOvz2nk0Y1f9LaJ;msgid=aYJ2I1m5PQ44w94LkqZRjZ;time=2021-07-04T10:37:08.028Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 1
S -> C: @batch=2KZ8YggHOvz2nk0Y1f9LaJ;msgid=OtI3mgnEX9cvnFNN1HApm4;time=2021-07-04T10:37:08.032Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 2
S -> C: @batch=2KZ8YggHOvz2nk0Y1f9LaJ;msgid=iC952TNKSra4djQbVqffRk;time=2021-07-04T10:37:08.035Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 3
S -> C: :My.Little.Server BATCH -2KZ8YggHOvz2nk0Y1f9LaJ

get messages "backward":

C -> S: CHATHISTORY BETWEEN ##chan timestamp=2021-07-04T10:37:08.037Z timestamp=2021-07-04T10:37:08.025Z 10
S -> C: :My.Little.Server BATCH +QMkF76iTAGmlVuKAKj5qt7 chathistory ##chan
S -> C: @batch=QMkF76iTAGmlVuKAKj5qt7;msgid=2Rw7IBLS3NPvHwWaXW5zpo;time=2021-07-04T10:37:08.025Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 0
S -> C: @batch=QMkF76iTAGmlVuKAKj5qt7;msgid=aYJ2I1m5PQ44w94LkqZRjZ;time=2021-07-04T10:37:08.028Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 1
S -> C: @batch=QMkF76iTAGmlVuKAKj5qt7;msgid=OtI3mgnEX9cvnFNN1HApm4;time=2021-07-04T10:37:08.032Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 2
S -> C: @batch=QMkF76iTAGmlVuKAKj5qt7;msgid=iC952TNKSra4djQbVqffRk;time=2021-07-04T10:37:08.035Z :bar!~username@Clk-4D552FD5 PRIVMSG ##chan :this is message 3
S -> C: :My.Little.Server BATCH -QMkF76iTAGmlVuKAKj5qt7
Additional InformationIMO the forward one (excluding both bounds) is implicitly the one recommended by the spec in the way it defines the limit ("With respect to the limit, the returned messages MUST be counted starting from and excluding the first message selector, while finishing on and excluding the second.")

It's also what Ergo does.
Tagsircv3
3rd party modules

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-07-04 12:41 progval New Issue
2021-07-04 12:41 progval Tag Attached: ircv3
2021-07-04 14:05 syzop Assigned To => syzop
2021-07-04 14:05 syzop Status new => confirmed