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

fix invoking yast modules without arguments (bsc#1121425) #887

Merged
merged 2 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions library/desktop/src/clients/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,16 @@ def Launch(modul)
cmd = ""
ret = nil

# prevent shell injection when passing argument. But on other hand do
# not pass empty argument which makes module think it is CLI (bsc#1121425)
argument = argument.empty? ? "" : argument.shellescape

# Use UI::RunInTerminal in text-mode only (#237332)
if textmode
cmd = Builtins.sformat("/sbin/yast %1 %2 >&2", function.shellescape, argument.shellescape)
cmd = Builtins.sformat("/sbin/yast %1 %2 >&2", function.shellescape, argument)
ret = UI.RunInTerminal(cmd)
else
cmd = Builtins.sformat("/sbin/yast2 %1 %2 >&2", function.shellescape, argument.shellescape)
cmd = Builtins.sformat("/sbin/yast2 %1 %2 >&2", function.shellescape, argument)
ret = SCR.Execute(path(".target.bash"), cmd)
end
Builtins.y2milestone("Got %1 from %2", ret, cmd)
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jan 10 14:45:03 UTC 2019 - Josef Reidinger <jreidinger@suse.com>

- Fix crashes of many modules when invoking from ncurses control
center (bsc#1121425)
- 4.1.49

-------------------------------------------------------------------
Mon Jan 7 08:40:21 UTC 2019 - lslezak@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 4.1.48
Version: 4.1.49
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0-only
Expand Down