File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ impl Str {
7171 pub fn push_str ( & mut self , s : & str ) {
7272 self . 0 . push_str ( s) ;
7373 }
74+
75+ pub fn to_uppercase ( & self ) -> Self {
76+ Self ( self . 0 . to_uppercase ( ) )
77+ }
78+
79+ pub fn to_lowercase ( & self ) -> Self {
80+ Self ( self . 0 . to_lowercase ( ) )
81+ }
7482}
7583
7684impl AsRef < str > for Str {
Original file line number Diff line number Diff line change @@ -258,7 +258,8 @@ impl TaskEnvs {
258258 GlobPatternSet :: new ( task. config . envs . iter ( ) . filter ( |s| !s. starts_with ( '!' ) ) ) ?;
259259 let sensitive_patterns = GlobPatternSet :: new ( SENSITIVE_PATTERNS ) ?;
260260 for ( name, value) in & all_envs {
261- if !envs_without_pass_through_patterns. is_match ( name) {
261+ let upper_name = name. to_uppercase ( ) ;
262+ if !envs_without_pass_through_patterns. is_match ( & upper_name) {
262263 continue ;
263264 }
264265 let Some ( value) = value. to_str ( ) else {
@@ -267,7 +268,7 @@ impl TaskEnvs {
267268 value : value. to_os_string ( ) ,
268269 } ) ;
269270 } ;
270- let value: Str = if sensitive_patterns. is_match ( name ) {
271+ let value: Str = if sensitive_patterns. is_match ( & upper_name ) {
271272 let mut hasher = Sha256 :: new ( ) ;
272273 hasher. update ( value. as_bytes ( ) ) ;
273274 format ! ( "sha256:{:x}" , hasher. finalize( ) ) . into ( )
You can’t perform that action at this time.
0 commit comments