[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-4' - forms/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 13 10:12:27 UTC 2020
forms/source/xforms/submission.cxx | 3 +++
forms/source/xforms/submission/submission.hxx | 6 ++++++
2 files changed, 9 insertions(+)
New commits:
commit 0b75202fe6a08ecc47340a8ed0845ec5cfe19b56
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 11 20:46:43 2020 +0100
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed May 13 12:11:56 2020 +0200
limit forms to http[s]
Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93995
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index f20b72f11973..7e8517e89481 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -253,6 +253,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
return false;
}
+ if (!xSubmission->IsWebProtocol())
+ return false;
+
CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler );
if (aResult == CSubmission::SUCCESS)
diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx
index 77d59b1f740e..a459f471ba0d 100644
--- a/forms/source/xforms/submission/submission.hxx
+++ b/forms/source/xforms/submission/submission.hxx
@@ -126,6 +126,12 @@ public:
, m_xContext(::comphelper::getProcessComponentContext())
{}
+ bool IsWebProtocol() const
+ {
+ INetProtocol eProtocol = m_aURLObj.GetProtocol();
+ return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https;
+ }
+
virtual ~CSubmission() {}
virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& ) = 0;
More information about the Libreoffice-commits
mailing list