Fix CodeQL flagged vulnerability (#5447)

* Fix CodeQL flagged vulnerability

* Update server/src/com/google/refine/Refine.java

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Update server/src/com/google/refine/Refine.java

cosmetic change from review

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>

---------

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
This commit is contained in:
Tom Morris 2023-01-27 15:09:43 -05:00 committed by GitHub
parent 74f74caecb
commit 02144da934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -516,11 +516,11 @@ class RefineClient extends JFrame implements ActionListener {
Runtime rt = Runtime.getRuntime();
if (SystemUtils.IS_OS_WINDOWS) {
rt.exec("rundll32 url.dll,FileProtocolHandler " + uri);
rt.exec(new String[] { "rundll32 ", "url.dll,FileProtocolHandler ", String.valueOf(uri) });
} else if (SystemUtils.IS_OS_MAC_OSX) {
rt.exec("open " + uri);
rt.exec(new String[] { "open ", String.valueOf(uri) });
} else if (SystemUtils.IS_OS_LINUX) {
rt.exec("xdg-open " + uri);
rt.exec(new String[] { "xdg-open", String.valueOf(uri) });
} else {
logger.warn("Java Desktop class not supported on this platform. Please open %s in your browser", uri.toString());
}