-
Notifications
You must be signed in to change notification settings - Fork 283
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
96
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
96 commits
Select commit
Hold shift + click to select a range
c3cb7f6
Allow modules to adjust the CSP headers through a dedicated hook.
w1ll-i-code 8f8652f
Add additional validation for the url before using it in the frame-sr…
w1ll-i-code 364de2d
Allow editing of the CSP trusted image sources
TheSyscall d078935
Refactor CSP validation logic and improve access control for shared n…
zenosaaur 018a920
Refactor CSP handling to improve user checks
zenosaaur 4b31e94
Add a table which displays where a CSP directive comes from
TheSyscall c0d456b
Move CSP table into its own Widget
TheSyscall d134e32
Integrate the custom CSP setting
TheSyscall f1d9222
Use new hook style
TheSyscall 7477372
Custom CSP should completely override the automatically generated one
TheSyscall af40aca
Allow configuration of the custom CSP-Header
TheSyscall 18156c3
Move the check to send the CSP header into the Csp::isCspEnabled method
TheSyscall d7128e6
Fix a bug that caused the custom CSP textarea to be empty
TheSyscall 9c83530
Allow for the usage of {style_nonce} in the custom CSP-Header setting
TheSyscall 2061b20
Allow newlines in custom CSP
TheSyscall 54ad4d4
Add dynamic descryption for the custom CSP textarea
TheSyscall 4fec376
Fix code formating
TheSyscall 452bafd
Use generator to iterate the navigation items
TheSyscall 43f78a7
Add info for navigation items
TheSyscall 45c8764
Create style nonce before trying to display the automatic csp
TheSyscall 6130964
Add GPLv2+ license headers
TheSyscall 9990363
Use a callout to display a warning message that is more obvious
TheSyscall 0ee410d
Simplify the way CSP items are collected for dashlets
TheSyscall fc07616
Use generators instead of iterating over arrays multiple times
TheSyscall 200789c
Write documentation & rename Items to Origins
TheSyscall 88903b0
Remove passive agressive note to admins
TheSyscall 48b9983
Display module name instead of hook class
TheSyscall 4a4130a
Apply code review changes
TheSyscall dacdf7f
Hide unused form elements and table if CSP is disabled
TheSyscall 2c4b8d2
Automatically reload the window on form success if CSP is active
TheSyscall 749a890
Change URLs in method documentation CspDirectiveHook::getCspDirectives()
TheSyscall dabf1f8
Use getValue instead of getPopulatedValue
TheSyscall 4601945
Handle update to new value gracefully
TheSyscall 841a30a
Use a hidden element with the same name to store the custom value
TheSyscall c6d0673
Remove superfluous mentions of CSP inside the Csp class
TheSyscall 33863bc
Add notification
TheSyscall 74b39de
Default use_custom_csp to 0
TheSyscall 356b049
Remove duplicate default-src directive
TheSyscall d1eb2b6
Store populated values in hidden form elements
TheSyscall fdd7ee4
Only store and reload page if necessary
TheSyscall 862f3be
Navigation items that have children can also link to something
TheSyscall 9deb914
Include the port in the navigation URL
TheSyscall 14524c8
Navigation items on the top level should not have themselves as a parent
TheSyscall 9417b20
Use 0/1 instead of n/y for config values
TheSyscall c7bc5b8
Removed unnecessary call to getUsername
TheSyscall b890ec3
Use generator to return the collection of CSP-Directives
TheSyscall 461a782
Split CSP-Table into multiple with apropriate headers.
TheSyscall 54db0b5
Hide tables with no content
TheSyscall 3c1a202
Use Link widget
TheSyscall 3990c0d
Move table into form
TheSyscall 7d37049
Change naming of button to "Send CSP-Header"
TheSyscall 45693c3
Color the "data:" schema based on the directive
TheSyscall 00d511c
Code style & Move arrays to class constants
TheSyscall f418ad5
Code review changes
TheSyscall 2074525
Prefixed CSS-classes with `csp-`
TheSyscall a552326
Add a toggle to enable user content
TheSyscall dedb1e6
Move CSP-Form into a newly created Security tab.
TheSyscall 1b17cac
Code review suggestions
TheSyscall 021ad89
Use new Csp class in ipl-web
TheSyscall 084e414
Code style changes
TheSyscall c82760c
Rework Csp to no longer rely on a private instance just to store the …
TheSyscall e77025e
Add form validation
TheSyscall 2a7378b
Merge CspConfigurationTable with form
TheSyscall 4386b95
Code review changes
TheSyscall 2fe75bc
Rename schema to scheme
TheSyscall e6551e6
Add rel="noopener noreferrer"
TheSyscall 6c25049
Store security seection in config even if the section didn't exist be…
TheSyscall 497ba28
Log errors during Csp loading
TheSyscall 0a7ad02
Return Csp instances instead of raw arrays
TheSyscall c541976
Change Hook name to CspHook
TheSyscall 7b9fcbc
Make tables collapsible
TheSyscall e6223bc
Split title from table
TheSyscall be1f91c
Indent polices if an icon exists in the table
TheSyscall 16f2e94
Return an empty array instead of throwing an error
TheSyscall 19274ae
Change license and use SPDX-Header
TheSyscall c483478
Display the label of the navigation type instead of its internal type
TheSyscall bb3a985
Write documentation
TheSyscall 25f6fc5
Change policy to expression to be more spec compliant
TheSyscall fd4d0f7
Add helper methods for accessing the currently active csp configuration
TheSyscall 0ab7f70
Display an info callout when adding dashlets or custom navigation items
TheSyscall 1ca96b2
List all users dashboard entries
TheSyscall 5d8571e
List all users navigation items
TheSyscall 92eb993
Better translations for table headers
TheSyscall 4b88a49
Handle all navigation types and respect share permissions
TheSyscall 49b9562
Refactor LoadedCsp to no longer extend Csp
TheSyscall f88cffb
Check if the directory exists before iterating
TheSyscall 2e1754d
Rename LoadedCsp to AttributedCsp
TheSyscall 1b33e08
Move the allUsers flag to the load method
TheSyscall 732d1eb
Use $this->translate instead of t()
TheSyscall ceeeee3
Reword docstrings
TheSyscall 4bc4dc3
Use array for class list
TheSyscall b7105d1
Gracefully handle the case where there is no owner defined
TheSyscall 11ceca2
Rename disabledState to useCustomCsp
TheSyscall 4896f24
Properly check for changes in the configuration
TheSyscall 48bdb51
Add security to fallback list
TheSyscall 7fa22c5
fixup! phpcs
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
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.