View Issue Details

IDProjectCategoryView StatusLast Update
0006259unrealircdpublic2023-04-13 18:56
Reporterarmyn Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0.7 
Fixed in Version6.1.0-rc2 
Summary0006259: JSON-RPC - channel object : the color codes are missing in the topic
DescriptionI ran this command in php:
$json= ["jsonrpc"=> "2.0", "method"=> "channel.list", "params"=> "{}", "id"=> 123];

I also noticed this on unrealircd-webpanel in the "channels" section.
I noticed that no topic had any colors or bold or anything, is this normal or an oversight?
TagsNo tags attached.
3rd party modules

Activities

syzop

2023-04-13 18:06

administrator   ~0022834

Currently JSON-RPC and JSON logging share the same code with regards to "sanitizing" stuff, like leaving out color codes and such. So it's kinda a side-effect of that.

I agree that JSON-RPC should not have that limitation though. Well maybe in the log messages over JSON-RPC... but not in the normal JSON-RPC calls like channel.get channel.list etc...

syzop

2023-04-13 18:56

administrator   ~0022835

Done now, thanks for bringing it up.

https://github.com/unrealircd/unrealircd/commit/66b82592343758b69cbed85de25270d0ca970d70

commit 66b82592343758b69cbed85de25270d0ca970d70 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD)
Author: Bram Matthys <[email protected]>
Date: Thu Apr 13 18:51:06 2023 +0200

    JSON-RPC: don't do filtering on low ASCII like we do for JSON logging.
    This way things like the TOPIC will keep their color codes if they have it.
    
    Reported by armyn in https://bugs.unrealircd.org/view.php?id=6259
    
    (And yeah i used a global to achieve this, otherwise it has too much
     of a cascading effect in XYZ functions)

Issue History

Date Modified Username Field Change
2023-04-13 03:06 armyn New Issue
2023-04-13 18:06 syzop Note Added: 0022834
2023-04-13 18:06 syzop Assigned To => syzop
2023-04-13 18:06 syzop Status new => acknowledged
2023-04-13 18:56 syzop Status acknowledged => resolved
2023-04-13 18:56 syzop Resolution open => fixed
2023-04-13 18:56 syzop Fixed in Version => 6.1.0-rc2
2023-04-13 18:56 syzop Note Added: 0022835