microsoft / microsoft/BotFramework-DirectLineJS
[Content Security Policy] Restrict `blob:` in `connect-src`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 199
- Forks
- 133
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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]
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in src/directLine.ts ungefähr bei Zeile 807 und überprüfe, wie botframework-directlinejs Attachment-Daten abruft und Blob-URLs erstellt. Die Arbeit ist abgeschlossen, wenn für Attachment-Uploads in connect-src nicht mehr blob: erforderlich ist und Object-URLs zuverlässig widerrufen werden können; im Issue wird keine Testdatei oder kein Test-Einstiegspunkt genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100