Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package otpclient for openSUSE:Factory 
checked in at 2021-02-15 23:20:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/otpclient (Old)
 and      /work/SRC/openSUSE:Factory/.otpclient.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "otpclient"

Mon Feb 15 23:20:27 2021 rev:6 rq:872518 version:2.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/otpclient/otpclient.changes      2021-01-05 
18:16:37.423532173 +0100
+++ /work/SRC/openSUSE:Factory/.otpclient.new.28504/otpclient.changes   
2021-02-15 23:22:06.559916379 +0100
@@ -1,0 +2,6 @@
+Fri Feb 12 07:31:08 UTC 2021 - Paolo Stivanin <i...@paolostivanin.com>
+
+- Update to 2.4.2
+  * fix handling of andOTP data when importing/exporting
+
+-------------------------------------------------------------------

Old:
----
  v2.4.1.tar.gz
  v2.4.1.tar.gz.asc

New:
----
  v2.4.2.tar.gz
  v2.4.2.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ otpclient.spec ++++++
--- /var/tmp/diff_new_pack.8kah12/_old  2021-02-15 23:22:07.235917389 +0100
+++ /var/tmp/diff_new_pack.8kah12/_new  2021-02-15 23:22:07.239917395 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package otpclient
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define uclname OTPClient
 Name:           otpclient
-Version:        2.4.1
+Version:        2.4.2
 Release:        0
 Summary:        Simple GTK+ client for managing TOTP and HOTP
 License:        GPL-3.0-or-later
@@ -75,14 +75,6 @@
 %{_mandir}/man1/otpclient.1.gz
 
 
%{_datadir}/icons/hicolor/scalable/apps/com.github.paolostivanin.OTPClient-symbolic.svg
-%{_datadir}/icons/hicolor/16x16/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/24x24/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/32x32/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/48x48/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/64x64/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/128x128/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/256x256/apps/com.github.paolostivanin.%{uclname}.png
-%{_datadir}/icons/hicolor/512x512/apps/com.github.paolostivanin.%{uclname}.png
 %{_datadir}/icons/hicolor/scalable/apps/com.github.paolostivanin.OTPClient.svg
 
 %changelog

++++++ v2.4.1.tar.gz -> v2.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-2.4.1/.github/workflows/codeql-analysis.yml 
new/OTPClient-2.4.2/.github/workflows/codeql-analysis.yml
--- old/OTPClient-2.4.1/.github/workflows/codeql-analysis.yml   1970-01-01 
01:00:00.000000000 +0100
+++ new/OTPClient-2.4.2/.github/workflows/codeql-analysis.yml   2021-02-12 
08:21:18.000000000 +0100
@@ -0,0 +1,44 @@
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ master ]
+  schedule:
+    - cron: '30 13 * * 1'
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'cpp' ]
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v2
+
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+
+    - name: Install Dependencies
+      run: |
+        sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt -y install 
git gcc clang cmake libgcrypt20-dev libgtk-3-dev libzip-dev libjansson-dev 
libpng-dev libzbar-dev
+        git clone https://github.com/paolostivanin/OTPClient ./OTPClient
+        cd OTPClient && chmod +x .ci/install_deps.sh && sudo 
.ci/install_deps.sh
+
+    - name: Build
+      run: | 
+       mkdir build && cd $_
+       cmake ..
+       make
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-2.4.1/CMakeLists.txt 
new/OTPClient-2.4.2/CMakeLists.txt
--- old/OTPClient-2.4.1/CMakeLists.txt  2020-12-31 08:34:56.000000000 +0100
+++ new/OTPClient-2.4.2/CMakeLists.txt  2021-02-12 08:21:18.000000000 +0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.5)
-project(OTPClient VERSION "2.4.1" LANGUAGES "C")
+project(OTPClient VERSION "2.4.2" LANGUAGES "C")
 
 configure_file("src/common/version.h.in" "version.h")
 include_directories(${PROJECT_BINARY_DIR})
@@ -206,13 +206,5 @@
 install(FILES man/otpclient.1.gz DESTINATION share/man/man1)
 install(FILES man/otpclient-cli.1.gz DESTINATION share/man/man1)
 
-install(FILES data/icons/icon_x16.png DESTINATION 
share/icons/hicolor/16x16/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x24.png DESTINATION 
share/icons/hicolor/24x24/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x32.png DESTINATION 
share/icons/hicolor/32x32/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x48.png DESTINATION 
share/icons/hicolor/48x48/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x64.png DESTINATION 
share/icons/hicolor/64x64/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x128.png DESTINATION 
share/icons/hicolor/128x128/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x256.png DESTINATION 
share/icons/hicolor/256x256/apps RENAME com.github.paolostivanin.OTPClient.png)
-install(FILES data/icons/icon_x512.png DESTINATION 
share/icons/hicolor/512x512/apps RENAME com.github.paolostivanin.OTPClient.png)
 install(FILES data/icons/com.github.paolostivanin.OTPClient.svg DESTINATION 
share/icons/hicolor/scalable/apps)
 install(FILES data/icons/com.github.paolostivanin.OTPClient-symbolic.svg 
DESTINATION share/icons/hicolor/scalable/apps)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-2.4.1/data/com.github.paolostivanin.OTPClient.appdata.xml 
new/OTPClient-2.4.2/data/com.github.paolostivanin.OTPClient.appdata.xml
--- old/OTPClient-2.4.1/data/com.github.paolostivanin.OTPClient.appdata.xml     
2020-12-31 08:34:56.000000000 +0100
+++ new/OTPClient-2.4.2/data/com.github.paolostivanin.OTPClient.appdata.xml     
2021-02-12 08:21:18.000000000 +0100
@@ -83,6 +83,14 @@
   </content_rating>
 
   <releases>
+    <release version="2.4.2" date="2021-02-12">
+      <description>
+        <p>OTPClient 2.4.2 contains a small fix to andOTP handling</p>
+        <ul>
+          <li>fix handling of andOTP data when importing/exporting, thanks to 
Michal Borek for the contribution</li>
+        </ul>
+      </description>
+    </release>
     <release version="2.4.1" date="2020-12-31">
       <description>
         <p>OTPClient 2.4.1 bring a new feature to the CLI</p>
Binary files old/OTPClient-2.4.1/data/icons/icon_x128.png and 
new/OTPClient-2.4.2/data/icons/icon_x128.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x16.png and 
new/OTPClient-2.4.2/data/icons/icon_x16.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x24.png and 
new/OTPClient-2.4.2/data/icons/icon_x24.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x256.png and 
new/OTPClient-2.4.2/data/icons/icon_x256.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x32.png and 
new/OTPClient-2.4.2/data/icons/icon_x32.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x48.png and 
new/OTPClient-2.4.2/data/icons/icon_x48.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x512.png and 
new/OTPClient-2.4.2/data/icons/icon_x512.png differ
Binary files old/OTPClient-2.4.1/data/icons/icon_x64.png and 
new/OTPClient-2.4.2/data/icons/icon_x64.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-2.4.1/src/common/andotp.c 
new/OTPClient-2.4.2/src/common/andotp.c
--- old/OTPClient-2.4.1/src/common/andotp.c     2020-12-31 08:34:56.000000000 
+0100
+++ new/OTPClient-2.4.2/src/common/andotp.c     2021-02-12 08:21:18.000000000 
+0100
@@ -184,19 +184,8 @@
         } else {
             json_object_set (export_obj, "type", json_object_get (db_obj, 
"type"));
         }
-
-        gchar *constructed_label;
-        const gchar *issuer_from_db = json_string_value (json_object_get 
(db_obj, "issuer"));
-        if (issuer_from_db != NULL && g_utf8_strlen (issuer_from_db, -1) > 0) {
-            constructed_label = g_strconcat (json_string_value 
(json_object_get (db_obj, "issuer")),
-                                            ":",
-                                            json_string_value (json_object_get 
(db_obj, "label")),
-                                            NULL);
-        } else {
-            constructed_label = g_strdup (json_string_value (json_object_get 
(db_obj, "label")));
-        }
-        json_object_set (export_obj, "label", json_string (constructed_label));
-        g_free (constructed_label);
+        json_object_set(export_obj, "issuer", json_object_get (db_obj, 
"issuer"));
+        json_object_set (export_obj, "label", json_object_get (db_obj, 
"label"));
         json_object_set (export_obj, "secret", json_object_get (db_obj, 
"secret"));
         json_object_set (export_obj, "digits", json_object_get (db_obj, 
"digits"));
         json_object_set (export_obj, "algorithm", json_object_get (db_obj, 
"algo"));
@@ -327,11 +316,17 @@
         otp_t *otp = g_new0 (otp_t, 1);
         otp->secret = secure_strdup (json_string_value (json_object_get (obj, 
"secret")));
 
-        const gchar *account_with_issuer = json_string_value (json_object_get 
(obj, "label"));
-        gchar **tokens = g_strsplit (account_with_issuer, ":", -1);
+        const gchar *issuer = json_string_value (json_object_get (obj, 
"issuer"));
+        otp->issuer = g_strdup (g_strstrip (issuer));
+        
+        const gchar *label_with_prefix = json_string_value (json_object_get 
(obj, "label"));
+        gchar **tokens = g_strsplit (label_with_prefix, ":", -1);
         if (tokens[0] && tokens[1]) {
-            otp->issuer = g_strdup (g_strstrip (tokens[0]));
-            otp->account_name = g_strdup (g_strstrip (tokens[1]));
+            if(issuer != NULL && g_ascii_strcasecmp(issuer, tokens[0]) == 0) {
+                otp->account_name = g_strdup (g_strstrip (tokens[1]));
+            } else {
+                otp->account_name = g_strdup (g_strstrip (label_with_prefix));
+            }
         } else {
             otp->account_name = g_strdup (g_strstrip (tokens[0]));
         }

Reply via email to