Skip to content

Commit

Permalink
Merge pull request #7669 from nadvornik/filespaces_uyuni
Browse files Browse the repository at this point in the history
Handle spaces in /ks/dist/ file names bsc#1213680
  • Loading branch information
nadvornik authored Oct 11, 2023
2 parents 69acb17 + 13f0f39 commit d147f7d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
import java.io.RandomAccessFile;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
Expand Down Expand Up @@ -222,7 +224,7 @@ else if (split[2].equals(CHILD)) {
for (int i = labelPos + 1; i < split.length; i++) {
path.append("/").append(split[i]);
}
ret.put("path", path.toString());
ret.put("path", URLDecoder.decode(path.toString(), StandardCharsets.UTF_8));
}
catch (ArrayIndexOutOfBoundsException e) {
return null;
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.nadvornik.filespaces
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Handle spaces in /ks/dist/ file names (bsc#1213680)
2 changes: 1 addition & 1 deletion spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SSLProxyEngine on
RewriteRule ^/ks/cfg([-a-zA-Z0-9\._/\%\ ]*)$ /rhn/kickstart/DownloadFile.do?ksurl=$1
RewriteRule ^/download/(.*)$ /rhn/common/DownloadFile.do?url=/$1
RewriteRule ^/rpc/api /rhn/rpc/api
RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1
RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1 "[B= ?+,BNP]"
RewriteRule ^(/ty/.*)$ /rhn/common/DownloadFile.do?url=$1
RewriteRule ^/index\.html$ /rhn/manager/login

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Handle spaces in /ks/dist/ file names (bsc#1213680)

0 comments on commit d147f7d

Please sign in to comment.