Don't base pass-otp availability decision on hardcoded /usr/lib#499
Don't base pass-otp availability decision on hardcoded /usr/lib#499annejan merged 1 commit intoIJHack:masterfrom
Conversation
/usr/lib does not exist in various Linux distributions, nor does it work if you have installed your qtpass to a custom prefix such as /usr/local or into your home directory. Disable this check for now, so that the OTP functionality can be enabled in such cases.
Codecov Report
@@ Coverage Diff @@
## master #499 +/- ##
=========================================
+ Coverage 9.36% 9.37% +<.01%
=========================================
Files 46 46
Lines 2925 2924 -1
=========================================
Hits 274 274
+ Misses 2651 2650 -1
Continue to review full report at Codecov.
|
|
I think the pass OTP extension path should simply be made (compile-time) configurable, OTP module autodetection is useful, please don't remove this functionality. |
That'd do as well. I didn't do it here because it's more sophisticated and I won't have time to do it. While I'd be happy with that, I also am not fully convinced that that's how
Personally I think it's a good approach to make a quick fix available immediately and work on an improvement afterwards (especially for a convenience feature like force-disabling a check box), versus having it broken until the improved solution is available. We must remember that the only thing this check does is to prevent the user to turn on an off-by-default checkbox by hand (or at least it seemed to be off-by-default on my system), which I'd consider not really that useful compared to not being able to use it at all. |
I agree with this . . |
/usr/libdoes not exist in various Linux distributions, nor does it work if you have installed your qtpass to a custom prefix such as/usr/localor into your home directory.Disable this check for now, so that the OTP functionality can be enabled in such cases.
As a result,
ConfigDialog::isPassOtpAvailable()now only has the functionality to returnfalseon platforms where the OTP functionality is certainly not supported.CC @FiloSpaTeam as the author of 5fc6c65 (via #407); also mentioning #394 and #327 so that this PR shows up there for others that, like me, searched for this problem.
A better future detection logic might be to run
pass otp --versionand check if that succeeds, but I'm not doing that here because it's more sophisticated and I'd like qtpass to work well withpass-otpfor all users as soon as possible.