Commit graph

4 commits

Author SHA1 Message Date
ze0s
604c7896bd
chore: add LICENSE GPLv2-or-later (#897)
* chore: add LICENSE

* chore: add LICENSE to README
2023-05-01 16:21:59 +02:00
martylukyy
169863dded
feat(logs): webhook sanitization (#809)
* feat: sanitize passwords from json payload

* add webhook sanitization

* update comments

Co-authored-by: soup <soup@r4tio.dev>

* sanitize RED apikeys from webhook payloads

* added an optional whitespace token between field name and data

---------

Co-authored-by: soup <soup@r4tio.dev>
2023-04-10 14:32:19 +02:00
soup
c2fcd91da7
refactor(logs): improve log sanitization performance (#779)
* refactor log sanitization for better performance

* Fix token error, add mutex for safer concurrency

* serve sanitized version directly from memory

* further improvements

made it check for "module":"irc" before running the irc regex checks

* Revert "further improvements"

This reverts commit 260037c3a58e1e760613167d3e15136b313c0612.

* update irc regexes to handle special characters

- added prefixes to the irc patterns
- improved tests

* more improvements for irc regexes

* fixed errors

* another edge case bites the dust

* regex improvements

* lock to 1 worker if cpu cores is 2 or less

* removed unused code

* revert to single thread

Moved regex patterns and replacements into a separate array for easier maintenance and readability.

Optimized the regex patterns that share the same replacement string to avoid redundancy.

Modify SanitizeLogFile to accept io.Writer for direct output

* style

* only check relevant lines

- only check relevant lines
- dont break unless length=0

* revert breaking change

* handle api and auth cases

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2023-03-26 23:25:23 +02:00
soup
4ade1b0ecf
feat(logs): sanitize logfile on download (#767)
* initial commit

* handle tleech urls

* improved and simplified regex

* add sanitization status & loading anim for log dl

* removed unused imports

* improved regex

* fixed regex and added tests

* regex improvements and tests

* added unicode matching to saslRegex

* added missing baseurl

* swapped the css animator for a react component

the css version froze when served through a reverse proxy

* optimized regex compilation

---------

Co-authored-by: soup <soup@r4tio.cat>
2023-03-19 21:57:16 +01:00