mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-25 13:13:48 +01:00
trim trailing \0 at the correct point
This commit is contained in:
parent
964293f653
commit
dca231f32e
@ -495,9 +495,9 @@ impl Authentication for FabFire {
|
||||
Ok(_) => {
|
||||
match apdu_response.body {
|
||||
Some(data) => {
|
||||
let authid = String::from_utf8(data).unwrap();
|
||||
let authid = String::from_utf8(data).unwrap().trim_matches(char::from(0)).to_string();
|
||||
let prov = ThisProvider::<AuthId>::with(
|
||||
authid.trim_matches(char::from(0)),
|
||||
&authid,
|
||||
);
|
||||
let key = session
|
||||
.need_with::<FabFireCardKey, _, _>(&prov, |key| {
|
||||
|
@ -353,9 +353,9 @@ impl Authentication for FabFire {
|
||||
Ok(_) => {
|
||||
match apdu_response.body {
|
||||
Some(data) => {
|
||||
let authid = String::from_utf8(data).unwrap();
|
||||
let authid = String::from_utf8(data).unwrap().trim_matches(char::from(0)).to_string();
|
||||
let prov = ThisProvider::<AuthId>::with(
|
||||
authid.trim_matches(char::from(0)),
|
||||
&authid,
|
||||
);
|
||||
let key = session
|
||||
.need_with::<FabFireCardKey, _, _>(&prov, |key| {
|
||||
|
Loading…
Reference in New Issue
Block a user