Skip to content
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

csp_policy do not include google workspace url lh3.googleusercontent.com #15238

Closed
2 tasks done
reiserfs opened this issue Aug 7, 2024 · 2 comments
Closed
2 tasks done

Comments

@reiserfs
Copy link

reiserfs commented Aug 7, 2024

Debug mode

Describe the bug

on Http/Middleware/SecurityHeaders.php line 91

$csp_policy[] = "img-src 'self' data: ".config('app.url').' '.config('app.additional_csp_urls').' '.env('PUBLIC_AWS_URL').' https://secure.gravatar.com https://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com';

is missing the google workspace url lh3.googleusercontent.com

adding *.googleusercontent.com solve the problem

Another problem is in Edit profile, if you have a google workspace avatar the URL generated is

https://snipeit.url.com/uploads/avatars/https://lh3.googleusercontent.com/a/data

Reproduction steps

  1. Login with google workspace
  2. try to see the avatar
  3. firefox block because csp_policy rule
    ...

Expected behavior

Open the avatar

Screenshots

No response

Snipe-IT Version

v7.0.10

Operating System

docker

Web Server

snipe/snipe-it:v7.0.10

PHP Version

8.1.2-1ubuntu2.18

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

Copy link

welcome bot commented Aug 7, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Aug 7, 2024

You should be able to add that to ADDITIONAL_CSP_URLS in your env.
https://snipe-it.readme.io/docs/configuration#optional-misc

@snipe snipe closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants