Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTP Secret is not detected if there is an otp string entry from a different plugin #16

Closed
clst opened this issue May 14, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@clst
Copy link

clst commented May 14, 2021

OTP Secret is not detected if there is an otp string entry from a different plugin (KeePassOTP).

Version: 1.5.3.0

TimeOtp-Secret-Base32 is correctly created and auto-type works but the setup dialog keeps appearing.
Renaming otp fixes the issue. (But then KeePassOTP stops working on the other PC).

My otp contains a standard otpauth:// string. Maybe it could be a candidate for an automatic fallback/import.

@tiuub tiuub self-assigned this May 15, 2021
@tiuub tiuub added the bug Something isn't working label May 15, 2021
@tiuub
Copy link
Owner

tiuub commented May 16, 2021

Hi @clst,

I'm still working on it. Basically it is hard to resolve the error, which happens when closing. I assume to present you a pre-release tomorrow.

Kind regards

@tiuub
Copy link
Owner

tiuub commented May 21, 2021

Hi @clst,

I have tried to fix your issue. Its complicated, I cant figure out, why KeePassOtp is crashing when closing KeePass. Anyway, I have implemented the "otpauth://" uri feature, so this will work for now. I will come back and tell you, if I have fixed the issue with KeePassOtp.

Here you have a pre-release with the implemented uri feature:
KeeOtp2 - 1.5.3.1(pre).zip

Just give it a try and feel free to comment any problems, bugs or enhancements.

Kind regards

@tiuub tiuub closed this as completed in fde0730 May 22, 2021
@tiuub tiuub reopened this May 22, 2021
@tiuub
Copy link
Owner

tiuub commented May 22, 2021

Accidentally closed.

@clst
Copy link
Author

clst commented May 29, 2021

Hi @tiuub,

Sorry for taking so long to try it.

Somehow all versions of the plugin > 1.5.3.0 crash Keepass on my Arch Linux. It seems some incompatibility with mono.
Probably the same reason why stable Arch is still on Keepass 2.47
I will try again once this is resolved.

If you want to look into it here is the crash report:

Wall of text with 1.5.3.1(pre)
≻ keepass                                                                                                                                                                                                          17:58:32

=================================================================
        Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
        Native stacktrace:
=================================================================
        0x560e4013cffd - mono : 
        0x560e4013d3a9 - mono : 
        0x560e400e79e9 - mono : 
        0x560e401366b9 - mono : 
        0x7faa1483ba10 - /usr/lib/libgdiplus.so.0 : 
        0x7faa1482009a - /usr/lib/libgdiplus.so.0 : GdipLoadImageFromDelegate_linux
        0x41841d48 - Unknown

=================================================================
        Telemetry Dumper:
=================================================================
Pkilling 0x140368366302784x from 0x140368537188160x
Pkilling 0x140368488871488x from 0x140368537188160x
Pkilling 0x140368375682624x from 0x140368537188160x
Entering thread summarizer pause from 0x140368537188160x
Finished thread summarizer pause from 0x140368537188160x.
Failed to create breadcrumb file (null)/crash_hash_0x12a3afafaf

Waiting for dumping threads to resume

=================================================================
        External Debugger Dump:
=================================================================
[New LWP 1449]
[New LWP 1450]
[New LWP 1456]
[New LWP 1457]
warning: File "/usr/bin/mono-sgen-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
        add-auto-load-safe-path /usr/bin/mono-sgen-gdb.py
line to your configuration file "/home/joe/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/joe/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007faa18d8da2f in wait4 () from /usr/lib/libc.so.6
  Id   Target Id                                      Frame 
* 1    Thread 0x7faa18cbf740 (LWP 1448) "mono"        0x00007faa18d8da2f in wait4 () from /usr/lib/libc.so.6
  2    Thread 0x7faa183ff640 (LWP 1449) "SGen worker" 0x00007faa18ec08ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
  3    Thread 0x7faa15eab640 (LWP 1450) "Finalizer"   0x00007faa18ec08ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
  4    Thread 0x7faa0f2b9640 (LWP 1456) "mono"        0x00007faa18ebd8cf in accept () from /usr/lib/libpthread.so.0
  5    Thread 0x7faa0e9c7640 (LWP 1457) "mono"        0x00007faa18ebe4cd in recvmsg () from /usr/lib/libpthread.so.0

Thread 5 (Thread 0x7faa0e9c7640 (LWP 1457) "mono"):
#0  0x00007faa18ebe4cd in recvmsg () at /usr/lib/libpthread.so.0
#1  0x00007faa148bb879 in  () at /usr/lib/libxcb.so.1
#2  0x00007faa148b98c7 in  () at /usr/lib/libxcb.so.1
#3  0x00007faa148bb08f in  () at /usr/lib/libxcb.so.1
#4  0x00007faa148bb203 in xcb_wait_for_reply64 () at /usr/lib/libxcb.so.1
#5  0x00007faa14949549 in _XReply () at /usr/lib/libX11.so.6
#6  0x00007faa1492d74b in XGetGeometry () at /usr/lib/libX11.so.6
#7  0x00007faa1480fea9 in GdipCreateFromXDrawable_linux () at /usr/lib/libgdiplus.so.0
#8  0x00000000417ebd69 in  ()
#9  0x0000560e42419668 in  ()
#10 0x00007faa184b0ad8 in  ()
#11 0x00007faa0e9c67c8 in  ()
#12 0x00007faa185c7b78 in  ()
#13 0x0000000005a00102 in  ()
#14 0x00007faa16375fa7 in  () at /usr/lib/mono/4.5/mscorlib.dll.so
#15 0x00007faa0fb89128 in  ()
#16 0x00007faa00002690 in  ()
#17 0x00007faa0e9c65f0 in  ()
#18 0x00007faa0e9c6320 in  ()
#19 0x0000560e42419668 in  ()
#20 0x00007faa00000b60 in  ()
#21 0x00007faa184b0ad8 in  ()
#22 0x00000000417ebc64 in  ()
#23 0x0000000000000000 in  ()

Thread 4 (Thread 0x7faa0f2b9640 (LWP 1456) "mono"):
#0  0x00007faa18ebd8cf in accept () at /usr/lib/libpthread.so.0
#1  0x0000560e40346a2e in  ()
#2  0x0000560e402d84e7 in  ()
#3  0x00000000418d84f4 in  ()
#4  0x00007faa1849a6c8 in  ()
#5  0x00007faa1849a808 in  ()
#6  0x00007faa1849a648 in  ()
#7  0x00007faa1849a718 in  ()
#8  0x00007faa1849b880 in  ()
#9  0x00007faa080f7db0 in  ()
#10 0x00007faa0f2b87b0 in  ()
#11 0x00007faa0f2b8710 in  ()
#12 0x00007faa0f2b87b0 in  ()
#13 0x00000000418a7c58 in  ()
#14 0x00007faa08025a70 in  ()
#15 0xfaff52a7f1116200 in  ()
#16 0x00007faa186f9470 in  ()
#17 0x0000000000000001 in  ()
#18 0x00007faa0f2b87c8 in  ()
#19 0x00007faa186b2a80 in  ()
#20 0x00000000418b7fc0 in  ()
#21 0x0000560e402f12e0 in  ()
#22 0x00007faa186f9470 in  ()
#23 0x00000000418a7c00 in  ()
#24 0x00007faa0f2b89e0 in  ()
#25 0x00000000418a7ad0 in  ()
#26 0x00007faa1849b760 in  ()
#27 0x00007faa00000000 in  ()
#28 0x00000000418a7a80 in  ()
#29 0x00007faa080d21a8 in  ()
#30 0x00000000418d7fde in  ()
#31 0x0000560e402f12e0 in  ()
#32 0x00000000418a79d0 in  ()
#33 0x00000000418a7a80 in  ()
#34 0x00007faa0f2b89e0 in  ()
#35 0x00000000418a7a10 in  ()
#36 0x00007faa1849a648 in  ()
#37 0x00000000418a79d0 in  ()
#38 0x00007faa0f2b89e0 in  ()
#39 0x00007faa1561afbb in KeePass_Util_IpcBroadcast_TcpThreadProcPriv () at /usr/share/keepass/KeePass.exe.so

Thread 3 (Thread 0x7faa15eab640 (LWP 1450) "Finalizer"):
#0  0x00007faa18ec08ca in __futex_abstimed_wait_common64 () at /usr/lib/libpthread.so.0
#1  0x00007faa18ebcae8 in __new_sem_wait_slow64.constprop.0 () at /usr/lib/libpthread.so.0
#2  0x0000560e403393e2 in  ()
#3  0x0000560e402efeca in  ()
#4  0x00007faa18eb4259 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007faa18dc05e3 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7faa183ff640 (LWP 1449) "SGen worker"):
#0  0x00007faa18ec08ca in __futex_abstimed_wait_common64 () at /usr/lib/libpthread.so.0
#1  0x00007faa18eba270 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#2  0x0000560e40399ed4 in  ()
#3  0x00007faa18eb4259 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007faa18dc05e3 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7faa18cbf740 (LWP 1448) "mono"):
#0  0x00007faa18d8da2f in wait4 () at /usr/lib/libc.so.6
#1  0x0000560e4013d27d in  ()
#2  0x0000560e4013d3a9 in  ()
#3  0x0000560e400e79e9 in  ()
#4  0x0000560e401366b9 in  ()
#5  0x00007faa1483ba10 in  () at /usr/lib/libgdiplus.so.0
#6  0x00007faa1482009a in GdipLoadImageFromDelegate_linux () at /usr/lib/libgdiplus.so.0
#7  0x0000000041841d48 in  ()
#8  0x00007ffe74a32710 in  ()
#9  0x00007ffe74a32c28 in  ()
#10 0x00007faa0fe76c00 in  ()
#11 0x00007faa0fe76ae0 in  ()
#12 0x00007faa0fe76580 in  ()
#13 0x00007faa0fe766c0 in  ()
#14 0x00007faa0fe76840 in  ()
#15 0x00007faa0fe76980 in  ()
#16 0x0000560e42330d30 in  ()
#17 0x00007faa187b8448 in  ()
#18 0x00007faa187b76a8 in  ()
#19 0x00007faa187b7628 in  ()
#20 0x00007faa187b74a8 in  ()
#21 0x00007faa187b7428 in  ()
#22 0x00007ffe74a32c28 in  ()
#23 0x00007ffe74a326b0 in  ()
#24 0x00007ffe74a325f0 in  ()
#25 0x00007faa187b7398 in  ()
#26 0x00007faa187b7398 in  ()
#27 0x0000000000000000 in  ()
[Inferior 1 (process 1448) detached]

=================================================================
        Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7faa1483ba10):0x7faa1483ba00  48 8b 94 24 b0 00 00 00 48 8b 8c 24 a8 00 00 00  H..$....H..$....
0x7faa1483ba10  0f b6 34 02 48 8d 14 40 48 01 d1 0f b6 79 02 41  [email protected]
0x7faa1483ba20  88 7c 85 08 0f b6 49 01 41 88 4c 85 09 48 8b 8c  .|....I.A.L..H..
0x7faa1483ba30  24 a8 00 00 00 0f b6 14 11 41 88 74 85 0b 41 88  $........A.t..A.

=================================================================
        Managed Stacktrace:
=================================================================
          at <unknown> <0xffffffff>
          at System.Drawing.GDIPlus:GdipLoadImageFromDelegate_linux <0x00167>
          at System.Drawing.Image:InitFromStream <0x0023f>
          at System.Drawing.Bitmap:.ctor <0x0003b>
          at System.Drawing.Bitmap:.ctor <0x00033>
          at <Module>:runtime_invoke_void__this___object <0x0009c>
          at <unknown> <0xffffffff>
          at System.Reflection.RuntimeConstructorInfo:InternalInvoke <0x000ad>
          at System.Reflection.RuntimeConstructorInfo:InternalInvoke <0x00057>
          at System.Reflection.RuntimeConstructorInfo:DoInvoke <0x0016c>
          at System.Reflection.RuntimeConstructorInfo:Invoke <0x0004e>
          at System.RuntimeType:CreateInstanceImpl <0x007b2>
          at System.Activator:CreateInstance <0x001e3>
          at System.Activator:CreateInstance <0x0004f>
          at Converter:ConvertFrom <0x00562>
          at System.ComponentModel.TypeConverter:ConvertFromString <0x0004f>
          at System.ComponentModel.TypeConverter:ConvertFromInvariantString <0x00043>
          at System.Resources.FileRefHandler:GetValue <0x00063>
          at System.Resources.FileRefHandler:GetValue <0x0002b>
          at System.Resources.ResXDataNode:GetValue <0x0003c>
          at System.Resources.ResXResourceReader:ParseDataNode <0x003df>
          at System.Resources.ResXResourceReader:LoadData <0x004a3>
          at System.Resources.ResXResourceReader:GetEnumerator <0x00037>
          at KeePass.Plugins.PlgxPlugin:CompileEmbeddedRes <0x001fa>
          at KeePass.Plugins.PlgxPlugin:Compile <0x003de>
          at KeePass.Plugins.PlgxPlugin:ReadFile <0x00504>
          at KeePass.Plugins.PlgxPlugin:LoadPriv <0x00154>
          at KeePass.Plugins.PlgxPlugin:Load <0x00062>
          at KeePass.Plugins.PluginManager:LoadAllPlugins <0x001f7>
          at KeePass.Plugins.PluginManager:LoadAllPlugins <0x0029b>
          at KeePass.Forms.MainForm:OnFormLoad <0x035d2>
          at System.Windows.Forms.Form:OnLoad <0x0009b>
          at System.Windows.Forms.Form:OnLoadInternal <0x0008b>
          at System.Windows.Forms.Form:OnCreateControl <0x00073>
          at System.Windows.Forms.Control:CreateControl <0x0015f>
          at System.Windows.Forms.Control:WmShowWindow <0x00153>
          at System.Windows.Forms.Control:WndProc <0x00333>
          at System.Windows.Forms.ScrollableControl:WndProc <0x00033>
          at System.Windows.Forms.ContainerControl:WndProc <0x00073>
          at System.Windows.Forms.Form:WndProc <0x00297>
          at KeePass.Forms.MainForm:WndProc <0x001b7>
          at ControlWindowTarget:OnMessage <0x0003c>
          at ControlNativeWindow:WndProc <0x00052>
          at System.Windows.Forms.NativeWindow:WndProc <0x0037b>
          at System.Windows.Forms.XplatUIX11:SendMessage <0x004bf>
          at System.Windows.Forms.XplatUIX11:MapWindow <0x00208>
          at System.Windows.Forms.XplatUIX11:CreateWindow <0x00e4b>
          at System.Windows.Forms.XplatUI:CreateWindow <0x0003c>
          at System.Windows.Forms.NativeWindow:CreateHandle <0x00057>
          at System.Windows.Forms.Control:CreateHandle <0x00095>
          at System.Windows.Forms.Form:CreateHandle <0x00043>
          at System.Windows.Forms.Control:CreateControl <0x000a3>
          at System.Windows.Forms.Control:SetVisibleCore <0x000d3>
          at System.Windows.Forms.Form:SetVisibleCore <0x001ff>
          at KeePass.Forms.MainForm:SetVisibleCore <0x000b1>
          at System.Windows.Forms.Control:set_Visible <0x0004b>
          at System.Windows.Forms.Control:set_Visible <0x00083>
          at System.Windows.Forms.Application:RunLoop <0x003df>
          at System.Windows.Forms.Application:Run <0x0007f>
          at System.Windows.Forms.Application:Run <0x0004f>
          at KeePass.Program:MainPriv <0x00fe5>
          at KeePass.Program:Main <0x00028>
          at <Module>:runtime_invoke_void_object <0x00091>
=================================================================
fish: Job 1, 'keepass' terminated by signal SIGABRT (Abort)

With 1.5.4.1 mono/keepass detects a problem, tells me my Keepass is too old and doesn't load the plugin.

@tiuub
Copy link
Owner

tiuub commented May 30, 2021

Oh I see. Your on Linux.

I will build up an VM with Linux to get an better understanding of this issue. Please give me some time. I will notify you, if I have a patch for you.

Kind regards

@clst
Copy link
Author

clst commented May 31, 2021

I was using KeeOtp2 on my Linux box and KeeOTP or KeePassOTP on the Windows PCs.
If all is well the DLLs/plgx files should just work under mono without any changes. Looks like a bug in mono to me.
Maybe some incompatibility with nhotkey or the new troubleshooting page. I don't think its directly connected to this issue.

@tiuub tiuub closed this as completed in 65ed0c2 Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants