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

config: expand default security.exec.osEnv policy #11217

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Jul 6, 2023

To better support private Hugo modules and automatically
launching a text editor on content creation, this change
adds the following environment variables to the default
security policy:

  • HOME
  • XDG_CONFIG_HOME
  • USERPROFILE
  • SSH_AUTH_SOCK
  • DISPLAY
  • LANG

Fixes #9333

Signed-off-by: David Karlsson 35727626+dvdksn@users.noreply.github.com

@bep
Copy link
Member

bep commented Jul 6, 2023

@jmooring these makes sense to me, agree?

@jmooring
Copy link
Member

jmooring commented Jul 6, 2023

I suggest we add DISPLAY and LANG to support the --editor CLI flag (and newContentEditor config key).

Details:
https://discourse.gohugo.io/t/launching-editor-upon-content-creation-with-v0-90-0-and-later/36421

To better support private Hugo modules and automatically
launching a text editor on content creation, this change
adds the following environment variables to the default
security policy:

- HOME
- XDG_CONFIG_HOME
- USERPROFILE
- SSH_AUTH_SOCK
- DISPLAY
- LANG

Fixes gohugoio#9333

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn force-pushed the fix/home-envvars-defaultcfg branch from 1fa2b3f to 284c138 Compare July 7, 2023 05:39
@dvdksn
Copy link
Contributor Author

dvdksn commented Jul 7, 2023

Thanks @bep and @jmooring, I've added the suggested vars to this as well. PTAL

@bep bep merged commit 6c9ea02 into gohugoio:master Jul 7, 2023
7 checks passed
@dvdksn dvdksn deleted the fix/home-envvars-defaultcfg branch July 7, 2023 13:54
jmooring added a commit to jmooring/hugo that referenced this pull request Jul 8, 2023
jmooring added a commit that referenced this pull request Jul 8, 2023
Copy link

github-actions bot commented Jul 7, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand security.exec.osEnv to make "hugo mod get" etc. work better out of the box on common OS setups
3 participants