NativeScript / NativeScript/plugins

[@nativescript/biometrics] - Android: ".pinFallBack: false" returns javax exception

オープン
#338 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
206
フォーク
123
平均マージ
2日 1時間
マージ済み PR(30日)
1

説明

General Info:

Android minSdk: 26
Android Emulator Sdk: 33
Plugin Version in package.json: ^1.3.1


JS Code in main-page.js
const biometricAuthPlugin = require('@nativescript/biometrics');
const biometrics = new biometricAuthPlugin.BiometricAuth();

biometrics.verifyBiometric({
                title: 'Speichern der Anmeldedaten',
                message: 'Anmeldedaten werden gespeichert bzw. überschrieben und in Zukunft zur schnelleren Anmeldung automatisch ausgefüllt.',
                fallbackMessage: 'Bitte PIN eingeben',
                pinFallback: false,
            }).then(function (result) {
                if (result.code === 0 || result.message === "All OK") {
                    AppSettings.setString("username", eventData.username);
                    AppSettings.setString("password", eventData.password);
                } else {
                    console.warn("Sonderfall Authentifizierung (erfolgreich aber nicht Code 0):", result);
                }
            }).catch(function (error) {
                if (error.code === 50 || error.message === "Authentication canceled") {
                    console.log("Authentifizierung durch Nutzer abgebrochen");
                } else {
                    console.warn("Fehlerfall bei der Authentifizierung:", error);
                }
            });

This is inside a function which responds to an Event in a WebView. eventData is provided by this function. This function is not the source of the problem, it always worked.


Steps:
  1. Start Auth. process
  2. Android Window Pops up
  3. Touch Fingerprint Sensor, Android confirms Fingerprint
  4. Error in onAuthenticationSucceeded: Error: javax.crypto.IllegalBlockSizeException

Might this be a problem of my installed Java-Version?
I checked that the usage of ü, ö, ä is not the Problem (Why ever this should be a problem, UTF-8 supports umlauts/mutations after all)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

@nativescript/biometrics の Android 実装と verifyBiometric パスから始め、pinFallback を false に設定して記載された手順を再現します。javax.crypto.IllegalBlockSizeException が関係する onAuthenticationSucceeded の失敗を調査します。この構成で指紋認証が成功してもその例外が発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, javascript, typescript
領域
authentication, mobile, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。