Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle spaces in /ks/dist/ file names bsc#1213680 #7669

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)