* Bug #12475 fixed - csvRead() does not support double quoted fields.
+* Bug #12761 fixed - The https:// protocol was not supported on ATOMS.
+
* Bug #12490 fixed - plot did not have a clf(); in its demo.
* Bug #12506 fixed - In SciNotes, miscolorization when returned values list was broken.
repositories = []; // Column vector that contains user repositories
currentRepositories = atomsRepositoryList();
currentRepositories = currentRepositories(:,1);
- valid_url_pattern = "/^((((H|h)(T|t)|(F|f))(T|t)(P|p)((S|s)?))\:\/\/)([a-zA-Z0-9]+)([\.][a-zA-Z0-9\-]+)*(\:[0-9]{1,5})*(\/($|[a-zA-Z0-9\.\,\;\?\''\\\+&%\$#\=~_\-]+))*$/";
+ // from https://gist.github.com/dperini/729294
+ // with unicode support, private and local address removed
+ valid_url_pattern = "/^" +..
+ ..// protocol identifier
+ "(?:(?:https?|ftp):\/\/)" +..
+ ..// user:pass authentication
+ "(?:\S+(?::\S*)?@)?" +..
+ "(?:" +..
+ ..// IP address dotted notation octets
+ ..// excludes loopback network 0.0.0.0
+ ..// excludes reserved space >= 224.0.0.0
+ ..// excludes network & broacast addresses
+ ..// (first & last IP address of each class)
+ "(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])" +..
+ "(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}" +..
+ "(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))" +..
+ "|" +..
+ ..// host name
+ "(?:(?:[a-z0-9]+-?)*[a-z0-9]+)" +..
+ ..// domain name
+ "(?:\.(?:[a-z0-9]+-?)*[a-z0-9]+)*" +..
+ ..// TLD identifier
+ "(?:\.(?:[a-z]{2,}))" +..
+ ")" +..
+ ..// port number
+ "(?::\d{2,5})?" +..
+ ..// resource path
+ "(?:\/[^\s]*)?" +..
+ "$/i";
+
// Check number of input arguments
// =========================================================================
repositories = [];
for i=1:size(repositories_in(:,1),"*")
- if regexp(repositories_in(i,1),"/^(http|ftp):\/\//","o") <> 1 then
+ if regexp(repositories_in(i,1),"/^(https?|ftp):\/\//","o") <> 1 then
repositories = [ repositories ; repositories_in(i,:) ];
end
end
// process URLs
if isfield(additional,"repository") & ..
( regexp(current_field,"/^(source|binary|windows|linux|macosx|solaris|bsd)(32|64)?Url$/","o")<>[] | current_field=="URL" ) & ..
- regexp(current_value,"/^(http(s)?|ftp(s)?|file)\:\/\//","o")==[] then
+ regexp(current_value,"/^(https?|ftps?|file):\/\//","o")==[] then
current_value = additional("repository") + current_value;
end
// Check input parameters value
// =========================================================================
- if regexp(url_in,"/^(http|ftp|file):\/\//","o") <> 1 then
- error(msprintf(gettext("%s: Wrong value for input argument #%d: String that start with ''http://'',''ftp://'' or ''file://'' expected.\n"),"atomsDownload",1));
+ if regexp(url_in,"/^(https?|ftp|file):\/\//","o") <> 1 then
+ error(msprintf(gettext("%s: Wrong value for input argument #%d: String that start with ''http(s)?://'',''ftp://'' or ''file://'' expected.\n"),"atomsDownload",1));
end
if (rhs>2) & (length(md5sum)<>32) then
// Build the command
// =========================================================================
- if regexp(url_in, "/^(http|ftp):\/\//", "o") == 1 then
+ if regexp(url_in, "/^(https?|ftp):\/\//", "o") == 1 then
proxy_host_arg = "";
proxy_user_arg = "";
timeout_arg = "";