microsoft / microsoft/BotFramework-DirectLineJS
[Content Security Policy] Restrict `blob:` in `connect-src`
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 199
- 派生
- 133
- PR 合并指标
- 30 天内没有已合并 PR
描述
Feature Request
Today, we require this directive: connect-src blob:.
This is because botframework-directlinejs use blob URL to retrieve ArrayBuffer for uploading attachments. The code is at https://github.com/microsoft/BotFramework-DirectLineJS/blob/master/src/directLine.ts#L807.
To-do
To remove this directive, we need to modify botframework-directlinejs to use ArrayBuffer or Blob to upload attachments.
Also today, since we are using URL.createObjectURL, we don't have a reliable way to revoke the URL. Moving to ArrayBuffer or Blob will help.
[Enhancement]
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 src/directLine.ts 约第 807 行开始,检查 botframework-directlinejs 如何获取附件数据并创建 blob URL。当附件上传不再需要在 connect-src 中使用 blob:,并且对象 URL 可以可靠地撤销时,这项工作就完成了;该 issue 未指定测试文件或测试入口点。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- api
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100