[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - forms/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 13 10:29:00 UTC 2020
forms/source/xforms/submission.cxx | 3 +++
forms/source/xforms/submission/submission.hxx | 6 ++++++
2 files changed, 9 insertions(+)
New commits:
commit 05ae3574a983219e98c8918d79806843168862c6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 11 20:46:43 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 13 10:21:00 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 08e04b8b2a33..bab40cc8d7d1 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -255,6 +255,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
return false;
}
+ if (!xSubmission->IsWebProtocol())
+ return false;
+
xSubmission->setEncoding(getEncoding());
CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler );
diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx
index 7d726392c736..f93146d5923e 100644
--- a/forms/source/xforms/submission/submission.hxx
+++ b/forms/source/xforms/submission/submission.hxx
@@ -127,6 +127,12 @@ public:
, m_xContext(::comphelper::getProcessComponentContext())
{}
+ bool IsWebProtocol() const
+ {
+ INetProtocol eProtocol = m_aURLObj.GetProtocol();
+ return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https;
+ }
+
virtual ~CSubmission() {}
void setEncoding(const OUString& aEncoding)
More information about the Libreoffice-commits
mailing list