Skip to content
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

增强js workflow_type_formatter和workflow_status_formatter方法兼容性. #2622

Merged
merged 2 commits into from
May 8, 2024

Conversation

feiazifeiazi
Copy link
Contributor

@feiazifeiazi feiazifeiazi commented May 8, 2024

增强js workflow_type_formatter和workflow_status_formatter方法兼容性。

  1. 方法的value参数值来自于bootstrap table。bootstrap-table在新版本会返回string类型,不再是int类型。

原因:
bootstrap-table修复安全问题说明
因需要修复安全问题,修改了escapeHTML方法,导致都返回了string类型。

其他说明:
1.archery以后可能会升级bootstrap-table,我先提前兼容一下代码。
2. 假如升级bootstrap-table,后端返回为数组,显示会有问题。 比如redis的 info keyspace。
3. 假如升级bootstrap-table,会解决很早的bug, excel导出时,时间类型值的错误问题。
4. 模拟安全问题示例, 可以提交一个mongo工单,内容如下,提交后。页面会弹框。
db.tab.insert({name:["Hello World! <img src='' onerror='alert(1)' />","Hello World! <img src='' onerror='alert(2)' />"]});

Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.96%. Comparing base (18214bc) to head (599ade7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2622   +/-   ##
=======================================
  Coverage   76.96%   76.96%           
=======================================
  Files         117      117           
  Lines       16139    16139           
=======================================
  Hits        12421    12421           
  Misses       3718     3718           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 8, 2024

hello, 要不你把 bootstrap-table 升了吧, 前端上不用考虑向后兼容的问题

@feiazifeiazi
Copy link
Contributor Author

hello, 要不你把 bootstrap-table 升了吧, 前端上不用考虑向后兼容的问题

我这边bootstrap-table版本开发环境升级了个1个月,但才刚刚部署到我们的生产环境。
还得再看看有什么bug。今天才发现 权限管理菜单的工单状态显示有问题。

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 8, 2024

行, 那我先把这个 merge 了, 后续你要升级欢迎 pr

@LeoQuote LeoQuote merged commit cc62c63 into hhyo:master May 8, 2024
10 checks passed
@feiazifeiazi feiazifeiazi deleted the update_formatter2 branch December 20, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants