From 96ed88f2086af22796a4c709f6f7b6f0f0e2d719 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Mon, 30 Sep 2024 20:02:56 +0900 Subject: [PATCH] =?utf8?q?=E3=81=A1=E3=82=93=E3=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/chkpass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chkpass.c b/src/chkpass.c index 9568575..bc3e1b5 100644 --- a/src/chkpass.c +++ b/src/chkpass.c @@ -42,7 +42,7 @@ void chkLenPass(const char *path, const char *pass, char *lang) { } else if (strlen(pass) >= minimumlen && strlen(pass) < recommendlen) { printf("【W】"); if (strncmp(lang, "en", 2) == 0) { - printf("The password \"%s\" is long enough, but for optimal security," + printf("The password \"%s\" is long enough, but for optimal security, " "%ld characters is recommended.\n", path, recommendlen); } else { @@ -134,7 +134,7 @@ void chkpass(const char *dpath, const char *mode) { for (size_t i = 0; i < chkDispaths.size; i++) { const char *pass = showpass(getElement(&chkDispaths, i)); if (!pass) continue; - if (strstr(pass, "otpauth://totp/")) continue; + if (strncmp(pass, "otpauth://totp/", strlen(pass)) == 0) continue; if (strncmp(mode, "all", 3) == 0) { // 全部を確認する @@ -150,7 +150,6 @@ void chkpass(const char *dpath, const char *mode) { } else if (strncmp(mode, "duplicate", 9) == 0) { // 複数回同じパスワードの確認 chkDupPass(getElement(&chkDispaths, i), pass, lang); - } else { } } -- 2.43.0