summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-14 20:08:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-15 09:51:22 +0000
commitddf4f82443254d88d9b984c68ed05fa16bb4607a (patch)
treef1942e4d71f24adcca4def0d515b6f7d44f3d6d9 /external
parentb4c8775526d701cfe0230ca34bfbbb9be00a71e7 (diff)
use upstream suggested fix
Change-Id: Ibe61144ea45211aa1b68e51d267ce5b7e1764839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147026 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/hsqldb/patches/disable-dump-script.patch46
1 files changed, 12 insertions, 34 deletions
diff --git a/external/hsqldb/patches/disable-dump-script.patch b/external/hsqldb/patches/disable-dump-script.patch
index 13e0213f7e57..401dd38abc9a 100644
--- a/external/hsqldb/patches/disable-dump-script.patch
+++ b/external/hsqldb/patches/disable-dump-script.patch
@@ -1,36 +1,14 @@
--- a/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 11:08:11.297243034 +0000
+++ b/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 13:49:17.973089433 +0000
-@@ -392,31 +392,19 @@
- */
- private Result processScript() throws IOException, HsqlException {
-
-- String token = tokenizer.getString();
-- ScriptWriterText dsw = null;
-+ tokenizer.getString();
-
- session.checkAdmin();
-
- try {
- if (tokenizer.wasValue()) {
-- if (tokenizer.getType() != Types.VARCHAR) {
-- throw Trace.error(Trace.INVALID_IDENTIFIER);
-- }
--
-- dsw = new ScriptWriterText(database, token, true, true, true);
--
-- dsw.writeAll();
--
-- return new Result(ResultConstants.UPDATECOUNT);
-+ throw Trace.error(Trace.ACCESS_IS_DENIED);
- } else {
- tokenizer.back();
-
- return DatabaseScript.getScript(database, false);
- }
- } finally {
-- if (dsw != null) {
-- dsw.close();
-- }
- }
- }
-
+@@ -403,6 +403,11 @@
+ throw Trace.error(Trace.INVALID_IDENTIFIER);
+ }
+
++ // added condition to avoid execution of spurious command in .script or .log file
++ if (session.isProcessingScript() || session.isProcessingLog()) {
++ return new Result(ResultConstants.UPDATECOUNT);
++ }
++
+ dsw = new ScriptWriterText(database, token, true, true, true);
+
+ dsw.writeAll();