Skip to content

Commit

Permalink
Merge pull request #37 from yast/replace_regexpmatch
Browse files Browse the repository at this point in the history
Replace Builtins.regexpmatch with tr when checking options valid characters
  • Loading branch information
teclator committed Oct 31, 2019
2 parents 90014f0 + afd9563 commit ff2b279
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions package/yast2-nfs-server.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Oct 25 11:38:41 UTC 2019 - Knut Anderssen <kanderssen@suse.com>

- Do not use Builtins.regexpmatch when checking the options as the
match is failing with default options depending on the locale
used (bsc#1151637)
- 4.2.2

-------------------------------------------------------------------
Tue Aug 27 18:20:56 CEST 2019 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-nfs-server.spec
Expand Up @@ -18,7 +18,7 @@

Name: yast2-nfs-server
Summary: YaST2 - NFS Server Configuration
Version: 4.2.1
Version: 4.2.2
Release: 0
URL: https://github.com/yast/yast-nfs-server
Group: System/YaST
Expand Down
2 changes: 1 addition & 1 deletion src/include/nfs_server/routines.rb
Expand Up @@ -347,7 +347,7 @@ def CheckNoSpaces(name)
# @return whether valid
def CheckExportOptions(options)
# colon is allowed for sec= option, see man 5 exports
if Builtins.regexpmatch(options, "[^A-Za-z0-9=/.:,_-]")
if options.match?(/[^[:alnum:]=\/\.:,_-]/)
# error popup message
Report.Error(
_(
Expand Down
3 changes: 3 additions & 0 deletions src/include/nfs_server/ui.rb
Expand Up @@ -200,6 +200,9 @@ def GetAllowedHosts(exports, expath, hosts, opts, allowed, fromedit)
end

if ret == :optsent
# Update the opts value when changed, otherwise the value validated
# later could be the cached one.
opts = Convert.to_string(UI.QueryWidget(Id(:optsent), :Value))
# check to see if user has changed options entry in the dialogue
# thrown due to a "Add Hosts" (as opposed to editing existing ones).
# If yes, suggest the user with a suitable default option set.
Expand Down

0 comments on commit ff2b279

Please sign in to comment.