mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
improve the basis name validator - ':' is an illegal character in a basis name.
This commit is contained in:
parent
ec5cc29ccd
commit
494ec7c2b3
3 changed files with 5 additions and 5 deletions
|
|
@ -198,10 +198,10 @@
|
||||||
"en-tts": "Symbols"
|
"en-tts": "Symbols"
|
||||||
},
|
},
|
||||||
"vault.illegal_char": {
|
"vault.illegal_char": {
|
||||||
"en": "Entries may not contain a newline character.",
|
"en": "Entries may not contain ':', or a newline character.",
|
||||||
"ja": "エントリに改行文字を含めることはできません。",
|
"ja": "エントリに「:」または改行文字を含めることはできません。",
|
||||||
"zh": "条目可能不包含换行符。",
|
"zh": "条目不得包含 ':' 或换行符。",
|
||||||
"en-tts": "Entries may not contain a newline character."
|
"en-tts": "Entries may not contain ':', or a newline character."
|
||||||
},
|
},
|
||||||
"vault.illegal_number": {
|
"vault.illegal_number": {
|
||||||
"en": "Please enter a number from 1-128",
|
"en": "Please enter a number from 1-128",
|
||||||
|
|
|
||||||
|
|
@ -1293,7 +1293,7 @@ pub(crate) fn totp_ss_validator(input: TextEntryPayload) -> Option<xous_ipc::Str
|
||||||
}
|
}
|
||||||
pub(crate) fn name_validator(input: TextEntryPayload) -> Option<xous_ipc::String<256>> {
|
pub(crate) fn name_validator(input: TextEntryPayload) -> Option<xous_ipc::String<256>> {
|
||||||
let proposed_name = input.as_str();
|
let proposed_name = input.as_str();
|
||||||
if proposed_name.contains('\n') { // the '\n' is reserved as the delimiter to end the name field
|
if proposed_name.contains(['\n',':']) { // the '\n' is reserved as the delimiter to end the name field, and ':' is the path separator
|
||||||
Some(xous_ipc::String::<256>::from_str(t!("vault.illegal_char", xous::LANG)))
|
Some(xous_ipc::String::<256>::from_str(t!("vault.illegal_char", xous::LANG)))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue