diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-13 23:06:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-13 23:06:38 +0100 |
| commit | 1c1676c83d5785e4c6a2212e68a8dff46eab4847 (patch) | |
| tree | 42bd3f6268f43cd3147ffc5cf45f4b67b0f2d829 /src/wx/barco_alchemy_certificate_panel.cc | |
| parent | e49fafc6388cec38e9e78e2c9d5d1f5890c13066 (diff) | |
Trim spaces from entries to certificate download pages.
Diffstat (limited to 'src/wx/barco_alchemy_certificate_panel.cc')
| -rw-r--r-- | src/wx/barco_alchemy_certificate_panel.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wx/barco_alchemy_certificate_panel.cc b/src/wx/barco_alchemy_certificate_panel.cc index 981efee1f..19bd18a8d 100644 --- a/src/wx/barco_alchemy_certificate_panel.cc +++ b/src/wx/barco_alchemy_certificate_panel.cc @@ -18,19 +18,24 @@ */ + #include "barco_alchemy_certificate_panel.h" #include "download_certificate_dialog.h" #include "wx_util.h" #include "lib/internet.h" #include "lib/compose.hpp" #include "lib/config.h" +#include <boost/algorithm/string.hpp> + using std::string; +using namespace boost::algorithm; using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif + BarcoAlchemyCertificatePanel::BarcoAlchemyCertificatePanel (DownloadCertificateDialog* dialog) : CredentialsDownloadCertificatePanel ( dialog, @@ -54,8 +59,9 @@ BarcoAlchemyCertificatePanel::ready_to_download () const void BarcoAlchemyCertificatePanel::do_download () { - string const serial = wx_to_std (_serial->GetValue()); - string const url = String::compose ( + string serial = wx_to_std (_serial->GetValue()); + trim(serial); + string url = String::compose ( "ftp://%1:%2@certificates.barco.com/%3xxx/%4/Barco-ICMP.%5_cert.pem", Config::instance()->barco_username().get(), Config::instance()->barco_password().get(), @@ -63,6 +69,7 @@ BarcoAlchemyCertificatePanel::do_download () serial, serial ); + trim(url); auto error = get_from_url (url, true, false, boost::bind (&DownloadCertificatePanel::load_certificate, this, _1, _2)); if (error) { |
