Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2016-10-20 23:06:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2016-10-18 13:27:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2016-10-20 23:06:12.000000000 +0200 @@ -2 +2,5 @@ -Sat Oct 15 19:11:39 UTC 2016 - kanders...@suse.com +Tue Oct 18 13:18:55 CEST 2016 - sch...@suse.de + +- Add-on module: Do not escape characters like ":" in the path + string (bnc#966413). +- 3.2.2 @@ -3,0 +8,2 @@ +------------------------------------------------------------------- +Sat Oct 15 19:11:39 UTC 2016 - kanders...@suse.com Old: ---- yast2-3.2.1.tar.bz2 New: ---- yast2-3.2.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.C99qpQ/_old 2016-10-20 23:06:13.000000000 +0200 +++ /var/tmp/diff_new_pack.C99qpQ/_new 2016-10-20 23:06:13.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.2.1 +Version: 3.2.2 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0 ++++++ yast2-3.2.1.tar.bz2 -> yast2-3.2.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/src/modules/URLRecode.rb new/yast2-3.2.2/library/types/src/modules/URLRecode.rb --- old/yast2-3.2.1/library/types/src/modules/URLRecode.rb 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/src/modules/URLRecode.rb 2016-10-19 09:16:01.000000000 +0200 @@ -9,7 +9,7 @@ class URLRecodeClass < Module # these will be substituted to a regex character class USERNAME_PASSWORD_FRAGMENT_SAFE_CHARS = "-A-Za-z0-9_.!~*'()".freeze - PATH_SAFE_CHARS = "-A-Za-z0-9_.!~*'()/".freeze + PATH_SAFE_CHARS = "-A-Za-z0-9_.!~*'()/:".freeze QUERY_SAFE_CHARS = "-A-Za-z0-9_.!~*'()/:=&".freeze # Escape password, user name and fragment part of URL string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/test/url_test.rb new/yast2-3.2.2/library/types/test/url_test.rb --- old/yast2-3.2.1/library/types/test/url_test.rb 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/test/url_test.rb 2016-10-19 09:16:01.000000000 +0200 @@ -22,8 +22,18 @@ end describe ".Parse" do - it "returns a hash containing the token extracted from the URL" do - expect(subject.Parse(url)).to eq(tokens) + context "given a http(s) URL" do + it "returns a hash containing the token extracted from the URL" do + expect(subject.Parse(url)).to eq(tokens) + end + + it "returns url with changed user" do + url = subject.Parse( + "http://name:p...@www.suse.cz:80/path/index.html?question#part" + ) + url["user"] = "user:1@domain" + expect(subject.Build(url)).to eq("http://user%3a1%40domain:p...@www.suse.cz:80/path/index.html?question#part") + end end context "given a CD/DVD with a file" do @@ -85,6 +95,54 @@ expect(subject.Parse(url)).to eq(tokens) end end + + context "given a Samba device and a path" do + let(:samba_url) { "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro&workgroup=group" } + it "returns samba host" do + SAMBA_URL = { + "domain" => "group", + "fragment" => "", + "host" => "servername", + "pass" => "passwd", + "path" => "/share/path/on/the/share", + "port" => "", + "query" => "mountoptions=ro&workgroup=group", + "scheme" => "smb", + "user" => "username" + }.freeze + expect(subject.Parse(samba_url)).to eq(SAMBA_URL) + end + end + + context "given an IPv6 URL" do + it "returns IPv6 host" do + IPV6_URL = { + "fragment" => "", + "host" => "2001:de8:0:f123::1", + "pass" => "", + "path" => "/path/to/dir", + "port" => "", + "query" => "", + "scheme" => "http", + "user" => "" + }.freeze + expect(subject.Parse("http://[2001:de8:0:f123::1]/path/to/dir")).to eq(IPV6_URL) + end + + it "returns IPv6 host with user/password, port" do + IPV6_URL_PORT = { + "fragment" => "", + "host" => "2001:de8:0:f123::1", + "pass" => "password", + "path" => "/path/to/dir", + "port" => "8080", + "query" => "", + "scheme" => "http", + "user" => "user" + }.freeze + expect(subject.Parse("http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir")).to eq(IPV6_URL_PORT) + end + end end describe ".Build" do @@ -92,6 +150,97 @@ expect(subject.Build(tokens)).to eq(url) end + it "returns valid URL string" do + expect(subject.Build("scheme" => "ftp", + "host" => "ftp.example.com", + "path" => "path/to/dir")).to eq( + "ftp://ftp.example.com/path/to/dir" + ) + end + + it "returns URL string with escaped leading / in the path" do + expect(subject.Build("scheme" => "ftp", + "host" => "ftp.example.com", + "path" => "/path/to/dir")).to eq( + "ftp://ftp.example.com/%2fpath/to/dir" + ) + end + + it "returns URL string with escaped leading // in the path" do + expect(subject.Build("scheme" => "ftp", + "host" => "ftp.example.com", + "path" => "//path/to/dir")).to eq( + "ftp://ftp.example.com/%2fpath/to/dir" + ) + end + + it "returns URL string with escaped leading /// in the path" do + expect(subject.Build("scheme" => "ftp", + "host" => "ftp.example.com", + "path" => "///path/to/dir")).to eq( + "ftp://ftp.example.com/%2fpath/to/dir" + ) + end + + it "returns URL string with escaped leading /// in the path and params" do + expect(subject.Build("scheme" => "ftp", + "host" => "ftp.example.com", + "query" => "param1=val1¶m2=val2", + "path" => "///path/to/dir")).to eq( + "ftp://ftp.example.com/%2fpath/to/dir?param1=val1¶m2=val2" + ) + end + + it "returns URL string with escaped non-ASCII chars in the path" do + # bnc#446395 + expect(subject.Build("scheme" => "dir", + "path" => "/path/to/\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u00E9/dir")).to eq( + "dir:///path/to/%c4%9b%c5%a1%c4%8d%c5%99%c5%be%c3%bd%c3%a1%c3%ad%c3%a9/dir" + ) + end + + it "returns URL string with nonescaped ':' in the path" do + # bnc#966413 + expect(subject.Build("scheme" => "nfs", + "host" => "test.suse.de", + "path" => "dist/ibs/SUSE:/SLE-SP1:/GA/images/iso/test.iso")).to eq( + "nfs://test.suse.de/dist/ibs/SUSE:/SLE-SP1:/GA/images/iso/test.iso" + ) + end + + context "given IPv6 host" do + it "returns ftp URL string with IPv6 host" do + expect(subject.Build("scheme" => "ftp", + "host" => "2001:de8:0:f123::1", + "path" => "///path/to/dir")).to eq( + "ftp://[2001:de8:0:f123::1]/%2fpath/to/dir" + ) + end + + it "returns http URL string with IPv6 host" do + expect(subject.Build("scheme" => "http", + "host" => "2001:de8:0:f123::1", + "port" => "8080", + "path" => "///path/to/dir")).to eq( + "http://[2001:de8:0:f123::1]:8080/path/to/dir" + ) + end + end + + context "given Samba host" do + it "returns samba URL string" do + # bnc#491482 + expect(subject.Build("domain" => "workgroup", + "host" => "myserver.com", + "pass" => "passwd", + "path" => "/share$$share/path/on/the/share", + "scheme" => "smb", + "user" => "username")).to eq( + "smb://username:pas...@myserver.com/share%24%24share/path/on/the/share?workgroup=workgroup" + ) + end + end + context "given CD/DVD tokens including a device" do context "with a device" do let(:tokens) do @@ -126,15 +275,20 @@ # This intention of these tests is to check if URLs are rebuilt correctly. URLS = { - "dvd:/dir" => "dvd:///dir", - "dvd://dir" => "dvd:///dir", - "dvd:///dir" => "dvd:///dir", - "cd:/?device=/dev/sr0" => "cd:///?device=/dev/sr0", - "cd:/some/file?device=/dev/sr0" => "cd:///some/file?device=/dev/sr0", - "cd:///some/file?device=/dev/sr0" => "cd:///some/file?device=/dev/sr0", - "http://u:p...@suse.de/a#b" => "http://u:p...@suse.de/a#b", - "ftp://u:p...@suse.de/a#b" => "ftp://u:p...@suse.de/a#b", - "slp:/" => "slp://" + "dvd:/dir" => "dvd:///dir", + "dvd://dir" => "dvd:///dir", + "dvd:///dir" => "dvd:///dir", + "cd:/?device=/dev/sr0" => "cd:///?device=/dev/sr0", + "cd:/some/file?device=/dev/sr0" => "cd:///some/file?device=/dev/sr0", + "cd:///some/file?device=/dev/sr0" => "cd:///some/file?device=/dev/sr0", + "http://u:p...@suse.de/a#b" => "http://u:p...@suse.de/a#b", + "ftp://u:p...@suse.de/a#b" => "ftp://u:p...@suse.de/a#b", + "dir:///" => "dir:///", + "http://na%40me:pa%3f%3...@www.suse.cz:80/path/index.html?question#part" => "http://na%40me:pa%3f%3...@www.suse.cz:80/path/index.html?question#part", + "http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir" => "http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir", + "http://name:p...@www.suse.cz:80/path/index.html?question#part" => "http://name:p...@www.suse.cz:80/path/index.html?question#part", + "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro&workgroup=group" => "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro&workgroup=group", + "slp:/" => "slp://" }.freeze URLS.each do |url, rebuilt| @@ -143,4 +297,95 @@ end end end + + describe ".EscapeString" do + it "returns empty string if the url is nil" do + expect(subject.EscapeString(nil, subject.transform_map_passwd)).to eq("") + end + + it "returns empty string if the url is empty too" do + expect(subject.EscapeString("", subject.transform_map_passwd)).to eq("") + end + + it "returns url without any special character" do + expect(subject.EscapeString("abcd", subject.transform_map_passwd)).to eq("abcd") + end + + it "returns string with escaped %" do + expect(subject.EscapeString("abcd%", subject.transform_map_passwd)).to eq("abcd%25") + end + + it "returns escaped $" do + expect(subject.EscapeString("ab%c$d", subject.transform_map_passwd)).to eq("ab%25c%24d") + end + + it "returns escaped blanks" do + expect(subject.EscapeString(" %$ ", subject.transform_map_passwd)).to eq("%20%25%24%20") + end + + it "returns not escaped _<>{}" do + expect(subject.EscapeString("_<>{}", subject.transform_map_passwd)).to eq("_<>{}") + end + + it "returns escaped %" do + expect(subject.EscapeString("%", subject.transform_map_passwd)).to eq("%25") + end + end + + describe ".UnEscapeString" do + it "returns empty string if the url is nil" do + expect(subject.UnEscapeString(nil, subject.transform_map_passwd)).to eq("") + end + + it "returns empty string if the url is empty too" do + expect(subject.UnEscapeString("", subject.transform_map_passwd)).to eq("") + end + + it "returns url without any special character" do + expect(subject.UnEscapeString("abcd", subject.transform_map_passwd)).to eq("abcd") + end + + it "returns string with unescaped %,/" do + expect(subject.UnEscapeString("ab%2fcd%25", subject.transform_map_passwd)).to eq("ab/cd%") + end + + it "returns unescaped @,%" do + expect(subject.UnEscapeString("ab%40%25", subject.transform_map_passwd)).to eq("ab@%") + end + + it "returns unescaped @" do + expect(subject.UnEscapeString("%40", subject.transform_map_passwd)).to eq("@") + end + + it "returns not (un)escaped _<>{}" do + expect(subject.UnEscapeString("_<>{}", subject.transform_map_passwd)).to eq("_<>{}") + end + end + + describe ".FormatURL" do + let(:long_url) { "http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file" } + it "returns not truncated URL string" do + expect(subject.FormatURL(subject.Parse(long_url), 200)).to eq( + "http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file" + ) + end + + it "returns truncated URL string" do + expect(subject.FormatURL(subject.Parse(long_url), 15)).to eq( + "http://download.opensuse.org/.../target_file" + ) + end + + it "returns truncated URL string" do + expect(subject.FormatURL(subject.Parse(long_url), 45)).to eq( + "http://download.opensuse.org/.../target_file" + ) + end + + it "returns truncated URL string" do + expect(subject.FormatURL(subject.Parse(long_url), 65)).to eq( + "http://download.opensuse.org/very/.../be/truncated/target_file" + ) + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/test/urlrecode_test.rb new/yast2-3.2.2/library/types/test/urlrecode_test.rb --- old/yast2-3.2.1/library/types/test/urlrecode_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.2.2/library/types/test/urlrecode_test.rb 2016-10-19 09:16:01.000000000 +0200 @@ -0,0 +1,52 @@ +#!/usr/bin/env rspec + +require_relative "test_helper" + +Yast.import "URLRecode" + +describe Yast::URLRecode do + subject { Yast::URLRecode } + + describe "#EscapePath" do + let(:test_path) { "/@\#$%^&/dir/\u010D\u00FD\u011B\u0161\u010D\u00FD\u00E1/file" } + it "returns nil if the url is nil too" do + expect(subject.EscapePath(nil)).to eq(nil) + end + + it "returns empty string if the url is empty too" do + expect(subject.EscapePath("")).to eq("") + end + + it "returns escaped path" do + expect(subject.EscapePath(test_path)).to eq( + "/%40%23%24%25%5e%26/dir/%c4%8d%c3%bd%c4%9b%c5%a1%c4%8d%c3%bd%c3%a1/file" + ) + end + + it "returns unchanged path while calling EscapePath and UnEscape" do + expect(subject.UnEscape(subject.EscapePath(test_path))).to eq(test_path) + end + + it "returns escaped special characters" do + expect(subject.EscapePath(" !@\#$%^&*()/?+=:")).to eq( + "%20!%40%23%24%25%5e%26*()/%3f%2b%3d:" + ) + end + end + + describe "#EscapePassword" do + it "returns escaped special characters" do + expect(subject.EscapePassword(" !@\#$%^&*()/?+=<>[]|\"")).to eq( + "%20!%40%23%24%25%5e%26*()%2f%3f%2b%3d%3c%3e%5b%5d%7c%22" + ) + end + end + + describe "#EscapeQuery" do + it "returns escaped special characters" do + expect(subject.EscapeQuery(" !@\#$%^&*()/?+=")).to eq( + "%20!%40%23%24%25%5e&*()/%3f%2b=" + ) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/testsuite/tests/URL.out new/yast2-3.2.2/library/types/testsuite/tests/URL.out --- old/yast2-3.2.1/library/types/testsuite/tests/URL.out 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/testsuite/tests/URL.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -Read .target.tmpdir "/tmp" -Return $["fragment":"part", "host":"www.suse.cz", "pass":"pass", "path":"/path/index.html", "port":"80", "query":"question", "scheme":"http", "user":"name"] -Return -Return -Return abcd -Return abcd%25 -Return ab%25c%24d -Return %20%25%24%20 -Return _<>{} -Return %25 -Return -Return -Return abcd -Return ab/cd% -Return ab@% -Return @ -Return _<>{} -Return http://name:p...@www.suse.cz:80/path/index.html?question#part -Return http://na%40me:pa%3f%3...@www.suse.cz:80/path/index.html?question#part -Return http://user%40domain:p...@www.suse.cz:80/path/index.html?question#part -Return ftp://ftp.example.com/path/to/dir -Return ftp://ftp.example.com/%2fpath/to/dir -Return ftp://ftp.example.com/%2fpath/to/dir -Return ftp://ftp.example.com/%2fpath/to/dir -Return ftp://ftp.example.com/%2fpath/to/dir?param1=val1¶m2=val2 -Return dir:///path/to/%c4%9b%c5%a1%c4%8d%c5%99%c5%be%c3%bd%c3%a1%c3%ad%c3%a9/dir -Return ftp://[2001:de8:0:f123::1]/%2fpath/to/dir -Return http://[2001:de8:0:f123::1]:8080/path/to/dir -Return $["fragment":"", "host":"2001:de8:0:f123::1", "pass":"", "path":"/path/to/dir", "port":"", "query":"", "scheme":"http", "user":""] -Return $["fragment":"", "host":"2001:de8:0:f123::1", "pass":"password", "path":"/path/to/dir", "port":"8080", "query":"", "scheme":"http", "user":"user"] -Return http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir -Return $["domain":"group", "fragment":"", "host":"servername", "pass":"passwd", "path":"/share/path/on/the/share", "port":"", "query":"mountoptions=ro&workgroup=group", "scheme":"smb", "user":"username"] -Return true -Return smb://username:pas...@myserver.com/share%24%24share/path/on/the/share?workgroup=workgroup -Return dir:/// -Return http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file -Return http://download.opensuse.org/.../target_file -Return http://download.opensuse.org/.../target_file -Return http://download.opensuse.org/very/.../be/truncated/target_file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/testsuite/tests/URL.rb new/yast2-3.2.2/library/types/testsuite/tests/URL.rb --- old/yast2-3.2.1/library/types/testsuite/tests/URL.rb 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/testsuite/tests/URL.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,219 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# File: XXXXXX -# Package: Configuration of network -# Summary: XXXXXX -# Author: Michal Svec <ms...@suse.cz> -# -# $Id$ -module Yast - class URLClient < Client - def main - Yast.include self, "testsuite.rb" - @READ = { "target" => { "tmpdir" => "/tmp" } } - TESTSUITE_INIT([@READ], nil) - - Yast.import "URL" - - TEST(lambda do - URL.Parse( - "http://name:p...@www.suse.cz:80/path/index.html?question#part" - ) - end, [], nil) - - TEST(->() { URL.EscapeString(nil, URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("abcd", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("abcd%", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("ab%c$d", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString(" %$ ", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("_<>{}", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.EscapeString("%", URL.transform_map_passwd) }, [], nil) - - TEST(->() { URL.UnEscapeString(nil, URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("abcd", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("ab%2fcd%25", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("ab%40%25", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("%40", URL.transform_map_passwd) }, [], nil) - TEST(->() { URL.UnEscapeString("_<>{}", URL.transform_map_passwd) }, [], nil) - - # parse->build must return the orginal value - TEST(lambda do - URL.Build( - URL.Parse( - "http://name:p...@www.suse.cz:80/path/index.html?question#part" - ) - ) - end, [], nil) - - # escaped values are built using lower case characters so there might be a change - TEST(lambda do - URL.Build( - URL.Parse( - "http://na%40me:pa%3f%3...@www.suse.cz:80/path/index.html?question#part" - ) - ) - end, [], nil) - - TEST(->() { test }, [], nil) - - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "ftp.example.com", - "path" => "path/to/dir" - - ) - end, [], nil) - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "ftp.example.com", - "path" => "/path/to/dir" - - ) - end, [], nil) - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "ftp.example.com", - "path" => "//path/to/dir" - - ) - end, [], nil) - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "ftp.example.com", - "path" => "///path/to/dir" - - ) - end, [], nil) - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "ftp.example.com", - "path" => "///path/to/dir", - "query" => "param1=val1¶m2=val2" - - ) - end, [], nil) - - # bnc #446395 - non-ASCII chars in path must be escaped - TEST(lambda do - URL.Build( - - "scheme" => "dir", - "path" => "/path/to/\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u00E9/dir" - - ) - end, [], nil) - - # IPv6 tests - TEST(lambda do - URL.Build( - - "scheme" => "ftp", - "host" => "2001:de8:0:f123::1", - "path" => "///path/to/dir" - - ) - end, [], nil) - TEST(lambda do - URL.Build( - - "scheme" => "http", - "host" => "2001:de8:0:f123::1", - "path" => "///path/to/dir", - "port" => "8080" - - ) - end, [], nil) - TEST(->() { URL.Parse("http://[2001:de8:0:f123::1]/path/to/dir") }, [], nil) - TEST(lambda do - URL.Parse("http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir") - end, [], nil) - TEST(lambda do - URL.Build( - URL.Parse( - "http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir" - ) - ) - end, [], nil) - - # smb:// tests - @smb_url = "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro&workgroup=group" - TEST(->() { URL.Parse(@smb_url) }, [], nil) - # parse->build must return the orginal value - TEST(->() { URL.Build(URL.Parse(@smb_url)) == @smb_url }, [], nil) - # bnc#491482 - TEST(lambda do - URL.Build( - - "domain" => "workgroup", - "host" => "myserver.com", - "pass" => "passwd", - "path" => "/share$$share/path/on/the/share", - "scheme" => "smb", - "user" => "username" - - ) - end, [], nil) - - TEST(->() { URL.Build(URL.Parse("dir:///")) }, [], nil) - - @long_url = "http://download.opensuse.org/very/log/path/which/will/be/truncated/target_file" - - # no truncation needed - TEST(->() { URL.FormatURL(URL.Parse(@long_url), 200) }, [], nil) - - # request too short result - TEST(->() { URL.FormatURL(URL.Parse(@long_url), 15) }, [], nil) - - TEST(->() { URL.FormatURL(URL.Parse(@long_url), 45) }, [], nil) - TEST(->() { URL.FormatURL(URL.Parse(@long_url), 65) }, [], nil) - - # EOF - - nil - end - - def test - # change the password in the URL - m = URL.Parse( - "http://name:p...@www.suse.cz:80/path/index.html?question#part" - ) - Ops.set(m, "user", "user@domain") - URL.Build(m) - end - end -end - -Yast::URLClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/testsuite/tests/URLRecode.out new/yast2-3.2.2/library/types/testsuite/tests/URLRecode.out --- old/yast2-3.2.1/library/types/testsuite/tests/URLRecode.out 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/testsuite/tests/URLRecode.out 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -Return nil -Return -Return /%40%23%24%25%5e%26/dir/%c4%8d%c3%bd%c4%9b%c5%a1%c4%8d%c3%bd%c3%a1/file -Return true -Return %20!%40%23%24%25%5e%26*()/%3f%2b%3d -Return %20!%40%23%24%25%5e%26*()%2f%3f%2b%3d%3c%3e%5b%5d%7c%22 -Return %20!%40%23%24%25%5e&*()/%3f%2b= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/library/types/testsuite/tests/URLRecode.rb new/yast2-3.2.2/library/types/testsuite/tests/URLRecode.rb --- old/yast2-3.2.1/library/types/testsuite/tests/URLRecode.rb 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/library/types/testsuite/tests/URLRecode.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -# encoding: utf-8 - -# *************************************************************************** -# -# Copyright (c) 2002 - 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -# *************************************************************************** -# Testsuite for URLRecode.pm module -# -# $Id$ -module Yast - class URLRecodeClient < Client - def main - Yast.include self, "testsuite.rb" - Yast.import "URLRecode" - - TEST(->() { URLRecode.EscapePath(nil) }, [], nil) - TEST(->() { URLRecode.EscapePath("") }, [], nil) - - @test_path = "/@\#$%^&/dir/\u010D\u00FD\u011B\u0161\u010D\u00FD\u00E1/file" - - TEST(->() { URLRecode.EscapePath(@test_path) }, [], nil) - TEST(lambda do - URLRecode.UnEscape(URLRecode.EscapePath(@test_path)) == @test_path - end, [], nil) - - TEST(->() { URLRecode.EscapePath(" !@\#$%^&*()/?+=") }, [], nil) - TEST(->() { URLRecode.EscapePassword(" !@\#$%^&*()/?+=<>[]|\"") }, [], nil) - TEST(->() { URLRecode.EscapeQuery(" !@\#$%^&*()/?+=") }, [], nil) - - # EOF - - nil - end - end -end - -Yast::URLRecodeClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/package/yast2.changes new/yast2-3.2.2/package/yast2.changes --- old/yast2-3.2.1/package/yast2.changes 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/package/yast2.changes 2016-10-19 09:16:01.000000000 +0200 @@ -1,6 +1,12 @@ ------------------------------------------------------------------- -Sat Oct 15 19:11:39 UTC 2016 - kanders...@suse.com +Tue Oct 18 13:18:55 CEST 2016 - sch...@suse.de + +- Add-on module: Do not escape characters like ":" in the path + string (bnc#966413). +- 3.2.2 +------------------------------------------------------------------- +Sat Oct 15 19:11:39 UTC 2016 - kanders...@suse.com - Network: Added method to adapt old configuration of enslaved interfaces. (bsc#962824) - 3.2.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.2.1/package/yast2.spec new/yast2-3.2.2/package/yast2.spec --- old/yast2-3.2.1/package/yast2.spec 2016-10-17 11:05:31.000000000 +0200 +++ new/yast2-3.2.2/package/yast2.spec 2016-10-19 09:16:01.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.2.1 +Version: 3.2.2 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0