Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2022-05-22 20:25:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Sun May 22 20:25:58 2022 rev:481 rq:978149 version:4.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2022-05-09 18:43:47.852185944 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.1538/yast2-network.changes 2022-05-22 20:25:59.842137789 +0200 @@ -1,0 +2,7 @@ +Wed May 18 19:49:34 UTC 2022 - Knut Anderssen <kanders...@suse.com> + +- CFA NM: replace problematic characters when getting the filename + for the given wireless configuration (bsc#1199451). +- 4.5.2 + +------------------------------------------------------------------- Old: ---- yast2-network-4.5.1.tar.bz2 New: ---- yast2-network-4.5.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.Vtx5vj/_old 2022-05-22 20:26:00.430138655 +0200 +++ /var/tmp/diff_new_pack.Vtx5vj/_new 2022-05-22 20:26:00.434138661 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.5.1 +Version: 4.5.2 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.5.1.tar.bz2 -> yast2-network-4.5.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.5.1/package/yast2-network.changes new/yast2-network-4.5.2/package/yast2-network.changes --- old/yast2-network-4.5.1/package/yast2-network.changes 2022-05-05 15:33:20.000000000 +0200 +++ new/yast2-network-4.5.2/package/yast2-network.changes 2022-05-19 19:24:34.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed May 18 19:49:34 UTC 2022 - Knut Anderssen <kanders...@suse.com> + +- CFA NM: replace problematic characters when getting the filename + for the given wireless configuration (bsc#1199451). +- 4.5.2 + +------------------------------------------------------------------- Wed May 4 13:23:14 UTC 2022 - Martin Vidner <mvid...@suse.com> - Disable loading the Ruby bindings in ag_udev_persistent, a stdio diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.5.1/package/yast2-network.spec new/yast2-network-4.5.2/package/yast2-network.spec --- old/yast2-network-4.5.1/package/yast2-network.spec 2022-05-05 15:33:20.000000000 +0200 +++ new/yast2-network-4.5.2/package/yast2-network.spec 2022-05-19 19:24:34.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.5.1 +Version: 4.5.2 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.5.1/src/lib/cfa/nm_connection.rb new/yast2-network-4.5.2/src/lib/cfa/nm_connection.rb --- old/yast2-network-4.5.1/src/lib/cfa/nm_connection.rb 2022-05-05 15:33:20.000000000 +0200 +++ new/yast2-network-4.5.2/src/lib/cfa/nm_connection.rb 2022-05-19 19:24:34.000000000 +0200 @@ -54,15 +54,17 @@ SYSTEM_CONNECTIONS_PATH = Pathname.new("/etc/NetworkManager/system-connections").freeze FILE_EXT = ".nmconnection".freeze + ESCAPE_CHAR = "_".freeze # Returns the file base name for the given connection # # @param conn [ConnectionConfig::Base] # @return [String] def file_basename_for(conn) - return conn.essid.to_s if conn.is_a?(Y2Network::ConnectionConfig::Wireless) && conn.essid + return conn.name unless conn.is_a?(Y2Network::ConnectionConfig::Wireless) && conn.essid - conn.name + # Convert special characters that could be problematic (bsc#1199451) + conn.essid.to_s.gsub(/^\.|\/|~$/, ESCAPE_CHAR) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.5.1/test/cfa/nm_connection_test.rb new/yast2-network-4.5.2/test/cfa/nm_connection_test.rb --- old/yast2-network-4.5.1/test/cfa/nm_connection_test.rb 2022-05-05 15:33:20.000000000 +0200 +++ new/yast2-network-4.5.2/test/cfa/nm_connection_test.rb 2022-05-19 19:24:34.000000000 +0200 @@ -54,9 +54,39 @@ end end - it "uses the ESSID as path basename" do - file = described_class.for(conn) - expect(file.file_path.basename.to_s).to eq("MY_WIRELESS.nmconnection") + context "and the ESSID is set" do + it "uses the ESSID as path basename" do + file = described_class.for(conn) + expect(file.file_path.basename.to_s).to eq("MY_WIRELESS.nmconnection") + end + + context "and the ESSID contains some '/' character" do + let(:essid) { "MY/WIRELESS" } + + it "replaces '/' characters with '_'" do + file = described_class.for(conn) + expect(file.file_path.basename.to_s).to eq("MY_WIRELESS.nmconnection") + end + end + + context "and the ESSID starts with a dot" do + let(:essid) { ".MY_WIRELESS" } + + it "replaces the '.' character with '_'" do + file = described_class.for(conn) + expect(file.file_path.basename.to_s).to eq("_MY_WIRELESS.nmconnection") + end + end + + context "and the ESSID ends with '~'" do + let(:essid) { ".MY/WIRELESS~" } + + it "replaces the '~' character with '_'" do + file = described_class.for(conn) + expect(file.file_path.basename.to_s).to eq("_MY_WIRELESS_.nmconnection") + end + end + end context "and the ESSID is not set" do