We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://twitter.com/kawaz/status/1477809915729448961?t=yDJcv4_ZsnpbLKiBoUmpbw&s=19
正規表現登録時に時間計算して長過ぎたら弾くバリデーションとか入れる……?
The text was updated successfully, but these errors were encountered:
Rustの正規表現って後方参照とか先読みのない素朴な正規表現なんだけど、潜在的に危険な機能の制限のおかげで線形時間での実行が保証されてるらしい(=redos攻撃の可能性がない?)
https://gihyo.jp/dev/serial/01/perl-hackers-hub/007402 https://medium.com/veltra-engineering/regexp-library-re2-for-fragility-risk-7c28310838e0
C++の安全な正規表現の実装がnode.isにも移植されてるらしいから、今ある正規表現をそれに変換するのが根本的な解決策になるかもしれない
Sorry, something went wrong.
ほえー ということは「既存の安全な正規表現の手法がある」ということなので、 その観点でいうと「なんかいい感じの安全正規表現ライブラリを探して使う」ってアプローチ取れそう。
Discordは最近デフォルトの荒らし対策みたいなやつが導入されて、ユーザーが正規表現書けるようになったんだけどそれはrustの正規表現使うのと、コンパイルサイズ制限で安全にしてる
でも安全な正規表現を使うなら、マッチリスト/マッチさせないリストの両方を用意するのと、それぞれ複数の正規表現を入れられるようにしないと表現力が落ちる。
No branches or pull requests
https://twitter.com/kawaz/status/1477809915729448961?t=yDJcv4_ZsnpbLKiBoUmpbw&s=19
正規表現登録時に時間計算して長過ぎたら弾くバリデーションとか入れる……?
The text was updated successfully, but these errors were encountered: