Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rust/operator-binary/src/crd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub struct KerberosPrincipal(String);
#[snafu(module)]
pub enum InvalidKerberosPrincipal {
#[snafu(display(
"principal contains illegal characters (allowed: alphanumeric, /, @, -, and .)"
"principal contains illegal characters (allowed: alphanumeric, /, @, -, _, and .)"
))]
IllegalCharacter,

Expand All @@ -342,7 +342,12 @@ impl TryFrom<String> for KerberosPrincipal {
if value.starts_with('-') {
invalid_kerberos_principal::StartWithDashSnafu.fail()
} else if value.contains(|chr: char| {
!chr.is_alphanumeric() && chr != '/' && chr != '@' && chr != '.' && chr != '-'
!chr.is_alphanumeric()
&& chr != '/'
&& chr != '@'
&& chr != '.'
&& chr != '-'
&& chr != '_'
}) {
invalid_kerberos_principal::IllegalCharacterSnafu.fail()
} else {
Expand Down
Loading