Commit Graph
169 Commits
Author SHA1 Message Date
ulleo 0b5588b5bf feat: add system param: SAMPLE_DATA_ENABLED 2026-09-15 11:46:16 +08:00
ulleo 3fd6fa867d feat: implement LLM keyword extraction and fusion scoring for table matching
- Add extract_keywords() to LLMService with conversation context support,
  using process_stream + start_log/end_log for logging consistency
- Add expand_with_terminology() to expand keywords with synonym matching
- Add fusion scoring in calc_table_embedding(): α * vec_score + (1-α) * keyword_score
- Add calc_keyword_score() with multi-level matching:
  table name exact (1.0), comment exact (0.9), comment substring (0.7),
  table name partial (0.25-0.5), field comment exact (0.5),
  field comment substring (0.4), field name partial (0.3)
- Scoring considers keyword coverage rate to differentiate tables
  with different numbers of matched keywords
- Extracted keywords persisted to ChatRecord for reuse across endpoints
- get_terminology_template() supports comma-separated keyword input
  with per-keyword matching for higher precision
- Add TABLE_EMBEDDING_ALPHA and TABLE_EMBEDDING_KEYWORD_ENABLED config
2026-09-14 17:51:45 +08:00
fit2cloud-chenyw 4ee923c968 Add config to hide default passwords or force password change at first login #1355 2026-09-02 16:41:01 +08:00
fit2cloud-chenywandClaude bbfc4cc8f5 fix(Security): Host header injection auth bypass and forged admin embedded token (CNVD)
- TokenMiddleware/ResponseMiddleware/audit logger use scope['path']
  instead of request.url.path for whitelist checks: a crafted Host
  header (e.g. x/api/v1/mcp) was concatenated into Starlette's URL
  and made protected routes match the /mcp* whitelist entry
- validateEmbedded rejects admin accounts and non-type-4 apps, so a
  self-signed token with account=admin can no longer impersonate the
  administrator
- Add HostValidationMiddleware rejecting malformed Host headers at the
  outermost layer (defense in depth)
- Add regression tests for host validation, whitelist matching and
  source-level guards

Co-Authored-By: Claude <[email protected]>
2026-08-31 11:05:05 +08:00
fit2cloud-chenyw 4058ad3602 feat: Add a verification interface for the assistant 2026-07-29 11:27:21 +08:00
sjj d21e7dea11 fix: avoid duplicate startup embedding jobs 2026-07-27 14:31:39 +08:00
ulleo 9726db544d refactor: replace dicttoxml with stdlib implementation to avoid GPL license risk 2026-07-24 18:09:00 +08:00
ulleo 74a0382c52 feat: add system log in mcp_start 2026-07-13 13:55:00 +08:00
fit2cloud-chenyw dc2b0788f4 perf: Add API documentation toggle control 2026-06-24 09:59:39 +08:00
ulleo 5b94406c3a fix: Fix SQL injection / LLM Prompt Injection vulnerability causing unauthorized queries
Security hardening:
- Add SQLBOT_ALLOW_METADATA_QUERIES config option, disable SHOW/DESCRIBE/EXPLAIN by default
- Add table whitelist check, use sqlglot to parse actual SQL table names and compare with authorized table list
- Add dangerous function check, block LOAD_FILE, INTO OUTFILE, EXEC etc. by database type
- Improve check_sql_read to return specific error reasons for better debugging
2026-06-11 17:29:38 +08:00
ulleo 316450b027 feat: improve float value display in export excel 2026-06-08 16:20:21 +08:00
yym 1cf4f249ed feat/fix(charts): Normalize qualified SQL column names for display
- Add DataFormat.normalize_qualified_sql_column_keys* so driver keys like
  "_u2.table_name" also expose "table_name", matching chart columns[].value.
- Apply after SQL execution (LLM save path), format_json_list_data (API/history),
  and get_chart_data_ds (live refresh).

Hive prompts: Document explicit table aliases for duplicate column names in JOINs.

Frontend: Add datasource form i18n key "file_path" (en/zh-CN/zh-TW/ko-KR).
Update Hive/SQLite datasource icons. Remove hive from haveSchema list.
2026-05-08 11:53:08 +08:00
fit2cloud-chenyw 559c80c5b9 perf: Optimize frontend localStorage key conflicts 2026-04-14 12:04:13 +08:00
fit2cloud-chenyw 5c136b46c5 perf: Optimize Embedded Assistant Cache Settings 2026-03-17 14:38:42 +08:00
fit2cloud-chenyw 6d63dcefc5 fix: Clickjacking Attack 2026-03-16 15:44:57 +08:00
Langel 0dd6536bf8 fix: add missing comma in whitelist.py causing /mcp* routes to be unwhitelisted
"*.css.map" was missing a trailing comma, causing Python's implicit string
literal concatenation to merge it with the next entry into "*.css.map/mcp*".
This made the /mcp* whitelist rule never match, so all /mcp/* endpoints
(mcp_start, mcp_question, mcp_get_sql, mcp_execute_sql, etc.) were blocked
by TokenMiddleware with "Miss Token[X-SQLBOT-TOKEN]" even though they are
intended to handle their own authentication internally.
2026-03-02 11:08:43 +08:00
fit2cloud-chenyw 5208b59800 fix: Authentication is required to access the API documentation #839 2026-02-09 16:47:40 +08:00
ulleo 5cdfc07169 feat: add context record count configuration to chat
#773
2026-01-26 17:21:56 +08:00
fit2cloud-chenyw e626d13971 fix: dynamic access path setup failure 2026-01-24 14:40:05 +08:00
ulleo 1cd7f743f2 feat: support multiple metrics in line, column, and bar charts 2026-01-08 16:27:12 +08:00
junjun 3ec03fa859 fix: Fix external database password containing special characters connection failure 2026-01-07 10:49:02 +08:00
fit2cloud-chenyw c78fc5d88b perf: Supports dynamic access paths 2026-01-06 12:14:08 +08:00
fit2cloud-chenyw 9112d2f6f0 feat: Wecom and dingtalk support 2026-01-05 17:54:36 +08:00
wangjiahao 95b058a2ad refactor: add log 2025-12-30 17:39:55 +08:00
wangjiahao e5fd7d297a fix: package error 2025-12-30 15:09:51 +08:00
wangjiahao 5c476971e5 fix: package error 2025-12-30 14:45:57 +08:00
wangjiahao f609dc2856 refactor: update log management 2025-12-30 14:26:31 +08:00
wangjiahao 57b3e6284f refactor: update log 2025-12-30 11:33:12 +08:00
wangjiahao 7efa0a9cff refactor: update logger decorator 2025-12-29 10:58:50 +08:00
wangjiahao ad7caefcca refactor: update logger decorator 2025-12-28 21:41:49 +08:00
wangjiahao 714a14b235 Merge remote-tracking branch 'origin/main' 2025-12-26 17:14:50 +08:00
wangjiahao 1df98cec0f refactor: Add logs to the system operation method 2025-12-26 17:14:34 +08:00
xuwei-fit2cloud c6909c5e28 refactor: Code security optimization 2025-12-26 16:38:47 +08:00
ulleo 19997cf2d4 improve: add lang parameter in mcp chat 2025-12-25 17:22:03 +08:00
fit2cloud-chenyw 52b094a344 perf: Global Transaction Mechanism 2025-12-24 11:52:14 +08:00
fit2cloud-chenyw 2cf44ac364 perf: Embedded Application Deletion Error 2025-12-23 19:47:22 +08:00
ulleo 6606bc0951 fix: resolve ambiguous boolean value error in pandas Series operations 2025-12-23 14:35:29 +08:00
ulleo b9b3376396 feat: support command in mcp 2025-12-22 16:46:41 +08:00
ulleo 37bf819b29 feat: support command in mcp 2025-12-18 19:01:11 +08:00
ulleo 3812d5308f feat: implement parameter configuration in chat 2025-12-16 16:13:50 +08:00
fit2cloud-chenyw 941167c460 feat: API documentation for user and workspace (#615) 2025-12-12 16:18:02 +08:00
ulleo 4d49819533 feat: improve regenerate SQL chat feature 2025-12-11 16:22:33 +08:00
junjun 2952c87d16 feat: Add Api Docs 2025-12-11 14:52:27 +08:00
fit2cloud-chenyw 966af42e81 feat(X-Pack): Supports third-party platforms as the default login method 2025-12-11 09:08:52 +08:00
fit2cloud-chenyw 1669ba3ed1 fix: Error occurs when re-uploading after the license expires 2025-12-10 16:45:43 +08:00
junjun 1ba4a7c561 fix: Unauthenticated Arbitrary File Upload in SQLBot uploadExcel Endpoint 2025-12-08 10:57:24 +08:00
fit2cloud-chenyw 9ddbefe658 perf: Multi-domain validation in embedded systems uses semicolon delimiters 2025-12-01 15:51:06 +08:00
ulleo 8023ce2907 fix: improve error message when uploading Excel file with incorrect column count 2025-11-27 14:56:51 +08:00
fit2cloud-chenyw c7693fc880 perf: Multiple Domain Validation for Embedded Systems #388 2025-11-25 21:43:21 +08:00
fit2cloud-chenyw 20ded06556 perf(X-Pack): Optimize OAuth2 customization logic (#478) 2025-11-21 16:55:16 +08:00