View Issue Details

IDProjectCategoryView StatusLast Update
0019307mantisbtfeaturepublic2026-05-10 09:51
ReporterfoXen Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version1.3.0-beta.1 
Summary0019307: Possibility to report violations of the Content-Security-Policy
Description

By enabling a new option there should be added a "report-uri"-directive to the CSP-Header.
This feature would help solving problems with Mantis Content-Security-Policy like current bug 0017491.

TagsNo tags attached.

Relationships

related to 0019576 closeddregad Allow admins to disable Content Security Policy 
related to 0014679 closeddregad Support Content-Security-Policy (CSP) per W3C specification 

Activities

foXen

foXen

2015-01-30 09:21

reporter   ~0048745

PR: https://github.com/mantisbt/mantisbt/pull/572

raspopov

raspopov

2026-05-10 05:20

reporter   ~0071082

Eleven years have passed, and the CSP header “report-uri” has now been declared deprecated; it is proposed that it be replaced with “Content-Security-Policy: report-to” and “Reporting-Endpoints:”.

Given the current capabilities of MantisBT, I think a more convenient implementation would be in the form of a plugin with its own database table, such as “mantis_csp_reports_table”. The current PR offer a standard file containing JSON reports in the site folder (!), with no size limit. Report URLs can be sent to the plugin via the REST interface and the EVENT_REST_API_ROUTES handler. The CSP headers can be inserted using the EVENT_CORE_HEADERS handler. The admin panel will display reports, sort, and filter requests such as “chrome-extension:” and “moz-extension:”.

This implementation will help administrators respond to XSS attacks (or false positives), maintainers debug MantisBT code, and plugin authors who frequently add links to external resources.

dregad

dregad

2026-05-10 06:36

developer   ~0071083

The original PR was a bit of a hack, which is the reason I never merged it. Indeed the proposed plugin approach seems more appropriate.

@raspopov are you planning to create such a plugin ?

raspopov

raspopov

2026-05-10 08:06

reporter   ~0071084

@dregad The company I work for uses an isolated local MantisBT instance and CSP isn't relevant in that case, so I didn't initially require this functionality. However, while working on recent pull requests (PRs) related to script and style isolation, I encountered 'invalid' requests blocked by CSP. A tool like this would undoubtedly make life easier. I’m not yet sure where to place this task on my mental priority list for MantisBT...

dregad

dregad

2026-05-10 09:51

developer   ~0071085

No worries, I was just checking. Great if you do, and if not then maybe someone else will before another 11 years go by ;-)