[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - forms/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 12 19:24:43 UTC 2020
forms/source/xforms/submission.cxx | 3 +++
forms/source/xforms/submission/submission.hxx | 6 ++++++
2 files changed, 9 insertions(+)
New commits:
commit 5d101a65c31e6c2f8dd0edffe05f69055cbd481c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 11 20:46:43 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue May 12 21:24:10 2020 +0200
limit forms to http[s]
Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93993
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.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