diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-11 20:46:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-12 17:03:35 +0200 |
commit | a5458d1f219c8a67d2c4c90fdbdf8ffba40d769d (patch) | |
tree | 76c626fc610ec707ba5b5fb44af340cd8a7cac2c /forms | |
parent | 898e4ae1364e76af8be22183ac64d73b6a6d8d90 (diff) |
limit forms to http[s]
Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94015
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/submission.cxx | 3 | ||||
-rw-r--r-- | forms/source/xforms/submission/submission.hxx | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index 84d8599f8cb1..6b759e18453e 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -250,6 +250,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 5818a159594c..22228a346e26 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -121,6 +121,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; |