From 67cc55ab45a07622a163ee8ed0cb9ecab055c509 Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 4 Oct 2024 16:18:24 +0000 Subject: [PATCH 1/9] Handle UTF8-Chars for eQSL-Credentials at upload correct --- application/controllers/Eqsl.php | 1 + application/models/Eqslmethods_model.php | 59 ++++++++++++------------ 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 608cd7668..dc3fe78e9 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -183,6 +183,7 @@ class eqsl extends CI_Controller { // the password, however, is always the same as the main account $data['user_eqsl_name'] = $qsl['station_callsign']; $adif = $this->eqslmethods_model->generateAdif($qsl, $data); + log_message("Error",$adif); $status = $this->eqslmethods_model->uploadQso($adif, $qsl); diff --git a/application/models/Eqslmethods_model.php b/application/models/Eqslmethods_model.php index f95cce1ca..a6aeb5a4e 100644 --- a/application/models/Eqslmethods_model.php +++ b/application/models/Eqslmethods_model.php @@ -41,7 +41,7 @@ class Eqslmethods_model extends CI_Model { function uploadUser($userid, $username, $password) { $data['user_eqsl_name'] = $this->security->xss_clean($username); - $data['user_eqsl_password'] = html_entity_decode($this->security->xss_clean($password)); + $data['user_eqsl_password'] = $password; $clean_userid = $this->security->xss_clean($userid); $qslsnotsent = $this->eqsl_not_yet_sent($clean_userid); @@ -49,7 +49,7 @@ class Eqslmethods_model extends CI_Model { foreach ($qslsnotsent->result_array() as $qsl) { $data['user_eqsl_name'] = $qsl['station_callsign']; $adif = $this->generateAdif($qsl, $data); - + $status = $this->uploadQso($adif, $qsl); if ($status == 'Error') { @@ -69,8 +69,8 @@ class Eqslmethods_model extends CI_Model { $COL_TIME_ON = date('Hi', strtotime($qsl['COL_TIME_ON'])); # Set up the single record file - $adif = "https://www.eqsl.cc/qslcard/importADIF.cfm?"; - $adif .= "ADIFData=WavelogUpload%20"; + $adifhead = "https://www.eqsl.cc/qslcard/importADIF.cfm?"; + $adifhead .= "ADIFData=WavelogUpload%20"; /* Handy reference of escaping chars "<" = 3C @@ -83,33 +83,34 @@ class Eqslmethods_model extends CI_Model { "&" = 26 */ - $adif .= "%3C"; - $adif .= "ADIF%5FVER"; - $adif .= "%3A"; - $adif .= "4"; - $adif .= "%3E"; - $adif .= "1%2E00 "; - $adif .= "%20"; + $adifhead .= "%3C"; + $adifhead .= "ADIF%5FVER"; + $adifhead .= "%3A"; + $adifhead .= "4"; + $adifhead .= "%3E"; + $adifhead .= "1%2E000"; + $adifhead .= "%20"; - $adif .= "%3C"; - $adif .= "EQSL%5FUSER"; - $adif .= "%3A"; - $adif .= strlen($data['user_eqsl_name']); - $adif .= "%3E"; - $adif .= $data['user_eqsl_name']; - $adif .= "%20"; + $adifhead .= "%3C"; + $adifhead .= "EQSL%5FUSER"; + $adifhead .= "%3A"; + $adifhead .= strlen($data['user_eqsl_name']); + $adifhead .= "%3E"; + $adifhead .= $data['user_eqsl_name']; + $adifhead .= "%20"; - $adif .= "%3C"; - $adif .= "EQSL%5FPSWD"; - $adif .= "%3A"; - $adif .= strlen($data['user_eqsl_password']); - $adif .= "%3E"; - $adif .= urlencode($data['user_eqsl_password']); - $adif .= "%20"; + $adifhead .= "%3C"; + $adifhead .= "EQSL%5FPSWD"; + $adifhead .= "%3A"; + $adifhead .= mb_strlen((($data['user_eqsl_password']))); + $adifhead .= "%3E"; + $adifhead .= rawurlencode($data['user_eqsl_password']); + $adifhead .= "%20"; - $adif .= "%3C"; - $adif .= "EOH"; - $adif .= "%3E"; + $adifhead .= "%3C"; + $adifhead .= "EOH"; + + $adif = "%3E"; # Lay out the required fields $adif .= "%3C"; @@ -246,6 +247,7 @@ class Eqslmethods_model extends CI_Model { # Make sure we don't have any spaces $adif = str_replace(" ", '%20', $adif); + $adif = $adifhead.$adif; return $adif; } @@ -324,7 +326,6 @@ class Eqslmethods_model extends CI_Model { } } } - log_message('debug', $result); return $status; } From 8ad79e68a1d4cdb30547f1225752a014160463c8 Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 4 Oct 2024 16:32:53 +0000 Subject: [PATCH 2/9] Remove DBG-Output --- application/controllers/Eqsl.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index dc3fe78e9..608cd7668 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -183,7 +183,6 @@ class eqsl extends CI_Controller { // the password, however, is always the same as the main account $data['user_eqsl_name'] = $qsl['station_callsign']; $adif = $this->eqslmethods_model->generateAdif($qsl, $data); - log_message("Error",$adif); $status = $this->eqslmethods_model->uploadQso($adif, $qsl); From 3191759bae59d9820e58c7bf66ed618fa7d9e0db Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Fri, 4 Oct 2024 20:44:56 +0000 Subject: [PATCH 3/9] fix cabrilo value "club" --- application/views/cabrillo/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/cabrillo/index.php b/application/views/cabrillo/index.php index a4cf9c4ea..1e85e122a 100644 --- a/application/views/cabrillo/index.php +++ b/application/views/cabrillo/index.php @@ -41,8 +41,8 @@
+ + +