-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chanlogs] exceptions with channels that have "/" #490
Comments
This is an interesting one as the list of forbidden characters depend on the filesystem. Since willie can be run on probably any filesystem out there, we need to figure out a list of blacklisted chars and a map of things to replace them with: what happens if a channel is named We need to figure out a better solution. Perhaps url-encoding channel names when they contain an illegal char? Obviously for ext2/3/4 filesystems we don't have the conflict problem since there are only two forbidden chars: / and NULL, but willie is cross-platform, and there's the possibility some crazy person out there is running willie on FAT16 from Linux. |
I like the idea of URL encoding, although I don't know whether that would play well serving the log dir over http. Would they end up double-encoded? Still, probably better to just do something to stop the errors, even if there's a better way. |
As much as I hate suggesting this, I think perfect is the enemy of good in this case, and translating "illegal" characters to something common is probably the best approach. The other alternative would be logging to a database by default, or using a checksum of some sort, which both lead to awful discoverability. Perhaps use something like __ (double underscore) as the substitution? Be very conservative in which "illegal" characters would trigger it. |
This probably works, but tbh I'm just throwing it together and haven't actually tested it. If it does work, it'll close sopel-irc#490.
I imagine there'll be issues with other characters too, so what can be done about this? I believe ZNC's log module replaces special characters with a
?
or_
, maybe this should be done here?The text was updated successfully, but these errors were encountered: