-
Notifications
You must be signed in to change notification settings - Fork 282
Allow custom csp header #5477
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
Open
TheSyscall
wants to merge
83
commits into
main
Choose a base branch
from
allow-custom-csp-header-5333
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow custom csp header #5477
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
f1b0702
Allow modules to adjust the CSP headers through a dedicated hook.
w1ll-i-code ac28021
Add additional validation for the url before using it in the frame-sr…
w1ll-i-code 9ae6675
Allow editing of the CSP trusted image sources
TheSyscall 29a4c63
Refactor CSP validation logic and improve access control for shared n…
zenosaaur eb2d42f
Refactor CSP handling to improve user checks
zenosaaur 9a22254
Add a table which displays where a CSP directive comes from
TheSyscall 21893eb
Move CSP table into its own Widget
TheSyscall ba93f40
Integrate the custom CSP setting
TheSyscall c0ed797
Use new hook style
TheSyscall 53a2097
Custom CSP should completely override the automatically generated one
TheSyscall 6a0e7d8
Allow configuration of the custom CSP-Header
TheSyscall 332cbea
Move the check to send the CSP header into the Csp::isCspEnabled method
TheSyscall 4586f2f
Fix a bug that caused the custom CSP textarea to be empty
TheSyscall f692db5
Allow for the usage of {style_nonce} in the custom CSP-Header setting
TheSyscall 9569d07
Allow newlines in custom CSP
TheSyscall ccd79d8
Fix a bug that caused the custom_csp value to not be saved
TheSyscall e8e40eb
Add dynamic descryption for the custom CSP textarea
TheSyscall 473baac
Fix code formating
TheSyscall 2cf104b
fixup! Fix code formating
TheSyscall 00cd765
Use generator to iterate the navigation items
TheSyscall 452ee7a
fixup! hasAccessToSharedNavigationItem doesn't need to be public
TheSyscall bda449a
Add info for navigation items
TheSyscall 56e34ed
Create style nonce before trying to display the automatic csp
TheSyscall 9831e64
Add GPLv2+ license headers
TheSyscall 4c51288
Use a callout to display a warning message that is more obvious
TheSyscall e5d9443
Simplify the way CSP items are collected for dashlets
TheSyscall aa419a0
Use generators instead of iterating over arrays multiple times
TheSyscall d63ab85
fixup! Code style
TheSyscall 2b2c20f
Write documentation & rename Items to Origins
TheSyscall e702437
Remove passive agressive note to admins
TheSyscall f48be73
Display module name instead of hook class
TheSyscall 8578118
Apply code review changes
TheSyscall 3b41810
Hide unused form elements and table if CSP is disabled
TheSyscall 40a5a44
Automatically reload the window on form success if CSP is active
TheSyscall 9a78158
Change URLs in method documentation CspDirectiveHook::getCspDirectives()
TheSyscall 4d41fd2
Use getValue instead of getPopulatedValue
TheSyscall 2856c7e
Handle update to new value gracefully
TheSyscall 152ebb3
Use a hidden element with the same name to store the custom value
TheSyscall 8c2e86d
Remove superfluous mentions of CSP inside the Csp class
TheSyscall 9663669
Use constructor promotion
TheSyscall a00a051
Remove duplicate default-src directive
TheSyscall 9dc386f
Store populated values in hidden form elements
TheSyscall 8f2f830
Only store and reload page if necessary
TheSyscall ca0f3e9
Navigation items that have children can also link to something
TheSyscall f39dd90
Include the port in the navigation URL
TheSyscall 1b861c9
Navigation items on the top level should not have themselves as a parent
TheSyscall 7989c69
Use 0/1 instead of n/y for config values
TheSyscall 2e05f49
Removed unnecessary call to getUsername
TheSyscall 864f801
Use generator to return the collection of CSP-Directives
TheSyscall 1865150
Split CSP-Table into multiple with apropriate headers.
TheSyscall 67f1493
Hide tables with no content
TheSyscall 7160113
Use Link widget
TheSyscall 02c4a5c
Move table into form
TheSyscall a11847d
fixup! Move CSP table into its own Widget
TheSyscall c615368
Change naming of button to "Send CSP-Header"
TheSyscall 7720360
Support custom CSP with empty value
TheSyscall 8a82898
Color the "data:" schema based on the directive
TheSyscall 60a4ffe
Code style & Move arrays to class constants
TheSyscall 6e84ac5
Code review changes
TheSyscall f2ee388
Add a toggle to enable user content
TheSyscall 97377a2
Move CSP-Form into a newly created Security tab.
TheSyscall 1a60be2
Code review suggestions
TheSyscall 1526729
Use new Csp class in ipl-web
TheSyscall 100dcfe
Prefixed CSS-classes with `csp-`
TheSyscall 9aeb8a8
Code style changes
TheSyscall e99fa2b
Rework Csp to no longer rely on a private instance just to store the …
TheSyscall 650f932
Add form validation
TheSyscall 9853a5b
Merge CspConfigurationTable with form
TheSyscall 9a0211e
fixup! Store `custom_csp`
TheSyscall 036fdd1
fixup! Remove large margin-bottom from table
TheSyscall b9da9f0
Default use_custom_csp to 0
TheSyscall 440e8ec
Store security seection in config even if the section didn't exist be…
TheSyscall 4b06ab8
Log errors during Csp loading
TheSyscall a204e9b
Return Csp instances instead of raw arrays
TheSyscall 9401454
Change Hook name to CspPolicyProvider
TheSyscall d34cf59
Make tables collapsible
TheSyscall 7ba3020
Split title from table
TheSyscall 55334f2
Code review changes
TheSyscall 65a8a19
Indent polices if an icon exists in the table
TheSyscall a3525b0
Return an empty array instead of throwing an error
TheSyscall 7e2f24c
Change license and use SPDX-Header
TheSyscall a7a64d6
Display the label of the navigation type instead of its internal type
TheSyscall bfec859
Write documentation
TheSyscall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.