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

[Bug]: bash profile file leaks new_dirs into the environment in some situations #5574

Closed
4 tasks done
leio opened this issue Nov 1, 2023 · 0 comments · Fixed by #5725
Closed
4 tasks done

[Bug]: bash profile file leaks new_dirs into the environment in some situations #5574

leio opened this issue Nov 1, 2023 · 0 comments · Fixed by #5725
Labels

Comments

@leio
Copy link

leio commented Nov 1, 2023

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.14.4

What Linux distribution are you using?

Gentoo Linux

Linux distribution version

No response

What architecture are you using?

aarch64

How to reproduce

su -
set |grep flatpak

outputs

XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/usr/share/gdm
new_dirs=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share

Expected Behavior

$new_dirs isn't in list of set variables in any situation.

I think running unset new_dirs at the end in profile/flatpak.sh should fix it, and it does for me, but I don't know the intricacies of this stuff, nor if it could be something to solve for other shell profile files as well.

Actual Behavior

new_dirs is exposed into the environment when the shell profiles are sourced in certain ways, e.g. via su -

Additional Information

No response

@leio leio added the bug label Nov 1, 2023
chrisawi added a commit to chrisawi/flatpak that referenced this issue Mar 15, 2024
TingPing pushed a commit that referenced this issue Mar 15, 2024
smcv pushed a commit to smcv/flatpak that referenced this issue Mar 27, 2024
Fixes: flatpak#5574
(cherry picked from commit 955d0c0)
smcv pushed a commit to smcv/flatpak that referenced this issue Apr 18, 2024
Fixes: flatpak#5574
(cherry picked from commit 955d0c0)
smcv pushed a commit to smcv/flatpak that referenced this issue Apr 22, 2024
Fixes: flatpak#5574
(cherry picked from commit 955d0c0)
smcv pushed a commit to smcv/flatpak that referenced this issue Apr 24, 2024
Fixes: flatpak#5574
(cherry picked from commit 955d0c0)
GeorgesStavracas pushed a commit to GeorgesStavracas/flatpak that referenced this issue Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant