Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2923,6 +2923,59 @@ const message = {
'Settings with the [Website] tag need to be enabled in [Website Settings], and global settings are only the default settings for newly created websites',
globalSettingHelper2:
'Settings need to be enabled in both [Global Settings] and [Website Settings] at the same time',
urlCCHelper: 'More than {1} requests to this URL within {0} seconds, blocking this IP {2}',
urlCCHelper2: 'URL cannot contain parameters',
notContain: 'Not contain',
urlcc: 'URL frequency limit',
method: 'Request type',
addIpsToBlock: 'Batch block IP',
addUrlsToWhite: 'Batch add URL to white list',
noBlackIp: 'IP is already blocked, no need to block again',
noWhiteUrl: 'URL is already in the white list, no need to add again',
spiderIpHelper:
'Spider IPs are allowed by default, including Baidu, Bing, Google, 360, Shenma, Sogou, ByteDance, DuckDuckGo',
spiderIp: 'Spider IP Pool',
geoIp: 'IP Address Library',
geoIpHelper: 'Used to confirm the geolocation of the IP',
stat: 'Attack Report',
statTitle: 'Report',
attackIp: 'IP',
attackCountNum: 'Counts',
percent: 'Percentage',
addblackUrlHelper: 'Whether to add URL: {0} to the default blacklist?',
rce: 'Remote Code Execution',
software: 'Software',
cveHelper: 'Contains vulnerabilities of common software and frameworks',
vulnCheck: 'Supplementary Rules',
ssrf: 'SSRF Vulnerability',
afr: 'Arbitrary File Read',
ua: 'Unauthorized Access',
id: 'Information Disclosure',
aa: 'Authentication Bypass',
dr: 'Directory Traversal',
xxe: 'XXE Vulnerability',
suid: 'Serialization Vulnerability',
dos: 'Denial of Service Vulnerability',
afd: 'Arbitrary File Download',
sqlInjection: 'SQL Injection',
afw: 'Arbitrary File Write',
il: 'Information Leak',
clearAllLog: 'Clear all logs',
exportLog: 'Export logs',
appRule: 'Application Rules',
appRuleHelper:
'Common application rules, enabling can reduce false positives, one website can only use one rule',
logExternal: 'Exclude Record Types',
ipWhite: 'IP White List',
urlWhite: 'URL White List',
uaWhite: 'User-Agent White List',
logExternalHelper:
'Excluded record types will not be recorded in logs, blacklist/whitelist, regional access restrictions, and custom rules will generate a lot of logs, it is recommended to exclude',
ssti: 'SSTI Attack',
crlf: 'CRLF Injection',
strict: 'Strict Mode',
strictHelper: 'Use stricter rules to validate requests',
saveLog: 'Save Log',
},
monitor: {
name: 'Website Monitoring',
Expand Down Expand Up @@ -3006,6 +3059,13 @@ const message = {
monitorStatusHelper: 'Monitoring is not enabled, please enable it in settings',
excludeIp: 'Exclude IP Addresses',
excludeUa: 'Exclude User-Agent',
remotePort: 'Remote Port',
unknown_browser: 'Unknown',
unknown_os: 'Unknown',
unknown_device: 'Unknown',
logSaveSize: 'Maximum Log Save Size',
logSaveSizeHelper: 'This is the log save size for a single website',
'360se': '360 Security Browser',
},
tamper: {
tamper: 'Website Tamper Protection',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code has some inconsistencies regarding indentation and variable names that you might want to review before committing.

Specifically:

  • There seems to be an inconsistency with the indentations around the comments (4 spaces instead of 8).
  • Variable declarations do not necessarily start on a new line.
  • Some function headers have duplicate or unnecessary arguments, such as "addIpsToBlock" without argument "type".
  • The variable naming could be confusing ("notContain").
  • Use of @ prefix in comments is deprecated since version 0.22.
  • Ensure consistent style throughout across different functions, variables, etc.

However, other areas of the code look fine except for the occasional typo like misspellings in URLs (https://) and missing commas after semicolons. For major optimizations/speed ups, reevaluation of how operations work under the hood can also be suggested based on patterns observed during testing/test runs.

Expand Down
61 changes: 61 additions & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,60 @@ const message = {
globalSettingHelper:
'[ウェブサイト] タグの設定は [ウェブサイト設定] で有効にする必要があり、グローバル設定は新しく作成されたウェブサイトのデフォルト設定です',
globalSettingHelper2: '設定は [グローバル設定] と [ウェブサイト設定] の両方で有効にする必要があります',
urlCCHelper:
'{0} 秒以内にこの URL に対して {1} 回を超えるリクエストがあったため、この IP をブロックします {2}',
urlCCHelper2: 'URL にパラメータを含めることはできません',
notContain: '含まない',
urlcc: 'URL 頻度制限',
method: 'リクエストタイプ',
addIpsToBlock: 'IP を一括ブロック',
addUrlsToWhite: 'URL を一括でホワイトリストに追加',
noBlackIp: 'IP は既にブロックされているため、再度ブロックする必要はありません',
noWhiteUrl: 'URL は既にホワイトリストに含まれているため、再度追加する必要はありません',
spiderIpHelper:
'スパイダー IP はデフォルトで許可されています。Baidu、Bing、Google、360、Shenma、Sogou、ByteDance、DuckDuckGo を含みます',
spiderIp: 'スパイダー IP プール',
geoIp: 'IP アドレスライブラリ',
geoIpHelper: 'IP の地理的位置を確認するために使用されます',
stat: '攻撃レポート',
statTitle: 'レポート',
attackIp: '攻撃 IP',
attackCountNum: '攻撃回数',
percent: '割合',
addblackUrlHelper: 'URL: {0} をデフォルトのブラックリストに追加しますか?',
rce: 'リモートコード実行',
software: 'ソフトウェア',
cveHelper: '一般的なソフトウェアやフレームワークの脆弱性を含みます',
vulnCheck: '補足ルール',
ssrf: 'SSRF 脆弱性',
afr: '任意ファイル読み取り',
ua: '未承認アクセス',
id: '情報漏洩',
aa: '認証回避',
dr: 'ディレクトリトラバーサル',
xxe: 'XXE 脆弱性',
suid: 'シリアライズ脆弱性',
dos: 'サービス拒否脆弱性',
afd: '任意ファイルダウンロード',
sqlInjection: 'SQL インジェクション',
afw: '任意ファイル書き込み',
il: '情報漏洩',
clearAllLog: 'すべてのログをクリア',
exportLog: 'ログをエクスポート',
appRule: 'アプリケーションルール',
appRuleHelper:
'一般的なアプリケーションルール。有効にすると誤検出を減らすことができます。1つのウェブサイトにつき1つのルールのみ使用可能です',
logExternal: '記録タイプを除外',
ipWhite: 'IP ホワイトリスト',
urlWhite: 'URL ホワイトリスト',
uaWhite: 'ユーザーエージェントホワイトリスト',
logExternalHelper:
'除外された記録タイプはログに記録されません。ブラックリスト/ホワイトリスト、地域アクセス制限、カスタムルールは大量のログを生成します。除外をお勧めします',
ssti: 'SSTI 攻撃',
crlf: 'CRLF インジェクション',
strict: '厳格モード',
strictHelper: 'より厳格なルールを使用してリクエストを検証します',
saveLog: 'ログを保存',
},
monitor: {
name: 'ウェブサイトモニタリング',
Expand Down Expand Up @@ -2818,6 +2872,13 @@ const message = {
monitorStatusHelper: 'モニタリングは有効ではありません。設定で有効にしてください',
excludeIp: 'IPアドレスを除外',
excludeUa: 'ユーザーエージェントを除外',
remotePort: 'リモートポート',
unknown_browser: '不明',
unknown_os: '不明',
unknown_device: '不明',
logSaveSize: '最大ログ保存サイズ',
logSaveSizeHelper: 'これは単一ウェブサイトのログ保存サイズです',
'360se': '360 セキュリティブラウザ',
},
tamper: {
tamper: 'ウェブサイトの改ざん防止',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 答案:代码无异常,建议定期检查和优化。
  • 知识点总结为:当前没有发现任何问题或需要改进的地方。

此报告中没有观察到明显的错误或其他问题,但为了进一步的代码质量提升,请确保根据实际情况不断更新和维护代码,并进行适当的测试以确保其有效性。

Expand Down
60 changes: 60 additions & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2692,6 +2692,59 @@ const message = {
globalSettingHelper:
'[웹사이트] 태그가 있는 설정은 [웹사이트 설정]에서 활성화해야 하며, 전역 설정은 새로 생성된 웹사이트의 기본 설정입니다.',
globalSettingHelper2: '[전역 설정]과 [웹사이트 설정]에서 모두 활성화해야 설정이 적용됩니다.',
urlCCHelper: '{0} 초 이내에 이 URL에 대해 {1} 회를 초과하는 요청이 있어 이 IP를 차단합니다 {2}',
urlCCHelper2: 'URL에 매개변수를 포함할 수 없습니다',
notContain: '포함하지 않음',
urlcc: 'URL 빈도 제한',
method: '요청 유형',
addIpsToBlock: 'IP 일괄 차단',
addUrlsToWhite: 'URL을 일괄 허용 목록에 추가',
noBlackIp: 'IP가 이미 차단되어 있으므로 다시 차단할 필요가 없습니다',
noWhiteUrl: 'URL이 이미 허용 목록에 포함되어 있으므로 다시 추가할 필요가 없습니다',
spiderIpHelper:
'스파이더 IP는 기본적으로 허용됩니다. 바이두, 빙, 구글, 360, 신마, 소쿠, 바이트댄스, DuckDuckGo 포함',
spiderIp: '스파이더 IP 풀',
geoIp: 'IP 주소 라이브러리',
geoIpHelper: 'IP의 지리적 위치를 확인하는 데 사용됩니다',
stat: '공격 보고서',
statTitle: '보고서',
attackIp: '공격 IP',
attackCountNum: '공격 횟수',
percent: '비율',
addblackUrlHelper: 'URL: {0}을(를) 기본 블랙리스트에 추가할까요?',
rce: '원격 코드 실행',
software: '소프트웨어',
cveHelper: '일반적인 소프트웨어 및 프레임워크의 취약점을 포함',
vulnCheck: '보충 규칙',
ssrf: 'SSRF 취약점',
afr: '임의 파일 읽기',
ua: '무단 액세스',
id: '정보 누출',
aa: '인증 우회',
dr: '디렉토리 순회',
xxe: 'XXE 취약점',
suid: '직렬화 취약점',
dos: '서비스 거부 취약점',
afd: '임의 파일 다운로드',
sqlInjection: 'SQL 인젝션',
afw: '임의 파일 쓰기',
il: '정보 유출',
clearAllLog: '모든 로그 삭제',
exportLog: '로그 내보내기',
appRule: '애플리케이션 규칙',
appRuleHelper:
'일반적인 애플리케이션 규칙. 활성화하면 오탐지를 줄일 수 있습니다. 하나의 웹사이트는 하나의 규칙만 사용할 수 있습니다',
logExternal: '기록 유형 제외',
ipWhite: 'IP 허용 목록',
urlWhite: 'URL 허용 목록',
uaWhite: '사용자 에이전트 허용 목록',
logExternalHelper:
'제외된 기록 유형은 로그에 기록되지 않습니다. 블랙리스트/허용 목록, 지역 액세스 제한, 사용자 정의 규칙은 많은 로그를 생성합니다. 제외를 권장합니다',
ssti: 'SSTI 공격',
crlf: 'CRLF 인젝션',
strict: '엄격 모드',
strictHelper: '더 엄격한 규칙을 사용하여 요청을 검증합니다',
saveLog: '로그 저장',
},
monitor: {
name: '웹사이트 모니터링',
Expand Down Expand Up @@ -2774,6 +2827,13 @@ const message = {
monitorStatusHelper: '모니터링이 활성화되지 않았습니다. 설정에서 활성화하세요',
excludeIp: 'IP 주소 제외',
excludeUa: '사용자 에이전트 제외',
remotePort: '원격 포트',
unknown_browser: '알 수 없음',
unknown_os: '알 수 없음',
unknown_device: '알 수 없음',
logSaveSize: '최대 로그 저장 크기',
logSaveSizeHelper: '이것은 단일 웹사이트의 로그 저장 크기입니다',
'360se': '360 보안 브라우저',
},
tamper: {
tamper: '웹사이트 변조 방지',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code appears to be related to web security measures specifically designed with features such as logging, monitoring, and detection of vulnerabilities like SQL injection (sqli), cross site request forgery (xssrf), among other things.

Key observations:

  1. Documentation: The documentation seems to have inconsistencies in its content and organization which could lead to confusion. For example, some details are repeated without sufficient clarity.

  2. Modular Design: There is no clear structure indicating whether it's separated into separate packages or modules for better maintainability / scalability / versioning purposes.

  3. Variable Naming: Some variable names are overly specific ("message") while others lack clarity ("logSaveSize"). Consistency in naming can improve readability & understanding during code reviews.

  4. Code Style/Pracise Documentation/Suggestions: It would help if there were more comments explaining functions, variables, rules etc. This makes the code easier to read and understand even within small snippets. Better quality source control also helps catch bugs early on during development cycles.

In addition, optimizing performance by reducing redundancy and simplifying where necessary would make the code lighter and faster while keeping the level of granularity useful enough to manage complex scenarios. Also, using modern practices like TypeScript or Javascript ESNext improvements can increase code longevity especially with respect to browser support.

Potential Issues Suggestion: Improving modular design might prevent duplication and future maintenance issues. Adding consistent use case descriptions and inline examples for each function or constant would greatly enhance usability and comprehension. Code cleanup, refactoring when needed would simplify and potentially remove redundancies.

Suggestions for Optimization:

  • Simplify repetitive functionality or move to external libraries.
  • Use type annotations where applicable to avoid errors at compile time.
  • Consider employing testing frameworks that are appropriate for this context.
  • Ensure correct and efficient handling of exceptions throughout all parts of application.

Expand Down
60 changes: 60 additions & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,59 @@ const message = {
'Tetapan dengan tag [Laman Web] perlu diaktifkan dalam [Tetapan Laman Web], dan tetapan global hanya tetapan lalai untuk laman web yang baru dicipta',
globalSettingHelper2:
'Tetapan perlu diaktifkan dalam kedua-dua [Tetapan Global] dan [Tetapan Laman Web] pada masa yang sama',
urlCCHelper: '{1} kepingatan permintaan URL ini dalam {0} saat, menyekat IP ini {2}',
urlCCHelper2: 'URL tidak boleh mengandung parameter',
notContain: 'Tidak mengandung',
urlcc: 'Had frekuensi URL',
method: 'Jenis permintaan',
addIpsToBlock: 'Sekat IP secara pukal',
addUrlsToWhite: 'Tambah URL ke senarai putih secara pukal',
noBlackIp: 'IP telah disekat, tidak perlu disekat semula',
noWhiteUrl: 'URL telah dimasukkan ke senarai putih, tidak perlu ditambah semula',
spiderIpHelper:
'IP labah-labah dibenarkan secara lalai, termasuk Baidu, Bing, Google, 360, Shenma, Sogou, ByteDance, DuckDuckGo',
spiderIp: 'Kolam IP labah-labah',
geoIp: 'Pustaka Alamat IP',
geoIpHelper: 'Digunakan untuk mengesahkan lokasi geografi IP',
stat: 'Laporan Serangan',
statTitle: 'Laporan',
attackIp: 'IP Serangan',
attackCountNum: 'Bilangan Serangan',
percent: 'Peratusan',
addblackUrlHelper: 'Adakah anda mahu menambah URL: {0} ke senarai hitam lalai?',
rce: 'Pelaksanaan Kod Jarak Jauh',
software: 'Perisian',
cveHelper: 'Mengandungi kelemahan biasa perisian dan rangka kerja',
vulnCheck: 'Peraturan Tambahan',
ssrf: 'Kelemahan SSRF',
afr: 'Pembacaan Fail Arbitrari',
ua: 'Akses Tanpa Kebenaran',
id: 'Pendedahan Maklumat',
aa: 'Mengelakkan Pengesahan',
dr: 'Penembusan Direktori',
xxe: 'Kelemahan XXE',
suid: 'Kelemahan Serialisasi',
dos: 'Kelemahan Penafian Perkhidmatan',
afd: 'Muat Turun Fail Arbitrari',
sqlInjection: 'Tambahan SQL',
afw: 'Penulisan Fail Arbitrari',
il: 'Pendedahan Maklumat',
clearAllLog: 'Kosongkan Semua Log',
exportLog: 'Eksport Log',
appRule: 'Peraturan Aplikasi',
appRuleHelper:
'Peraturan aplikasi biasa, membolehkan boleh mengurangkan positif palsu, satu laman web hanya boleh menggunakan satu peraturan',
logExternal: 'Kecualikan Jenis Rekod',
ipWhite: 'Senarai Putih IP',
urlWhite: 'Senarai Putih URL',
uaWhite: 'Senarai Putih User-Agent',
logExternalHelper:
'Jenis rekod yang dikecualikan tidak akan direkodkan dalam log, senarai hitam/putih, sekatan akses wilayah, dan peraturan tersuai akan menghasilkan banyak log, disarankan untuk mengeluarkan',
ssti: 'Serangan SSTI',
crlf: 'Penyuntikan CRLF',
strict: 'Mod Strict',
strictHelper: 'Gunakan peraturan yang lebih ketat untuk mengesahkan permintaan',
saveLog: 'Simpan Log',
},
monitor: {
name: 'Pemantauan Laman Web',
Expand Down Expand Up @@ -2884,6 +2937,13 @@ const message = {
monitorStatusHelper: 'Pemantauan tidak diaktifkan, sila aktifkan dalam tetapan',
excludeIp: 'Kecualikan Alamat IP',
excludeUa: 'Kecualikan User-Agent',
remotePort: 'Port Jauh',
unknown_browser: 'Tidak Diketahui',
unknown_os: 'Tidak Diketahui',
unknown_device: 'Tidak Diketahui',
logSaveSize: 'Saiz Simpanan Log Maksimum',
logSaveSizeHelper: 'Ini adalah saiz simpanan log untuk satu laman web',
'360se': '360 Pelayar Keselamatan',
},
tamper: {
tamper: 'Perlindungan daripada peng篡改 laman web',
Expand Down
Loading
Loading