File tree Expand file tree Collapse file tree
plugin/src/main/java/io/jenkins/plugins/casc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,23 +201,18 @@ static class DecodeBase64Lookup implements StringLookup {
201201
202202 @ Override
203203 public String lookup (@ NonNull final String key ) {
204- if (StringUtils .isBlank (key )) {
205- return "" ;
206- }
207204
208205 final String value = key .trim ();
209206
210- if (value .startsWith ( "-----BEGIN " )) {
211- return value ;
207+ if (value .isEmpty ( )) {
208+ return "" ;
212209 }
213210
214- String compact = value .replaceAll ("\\ s+" , "" );
215-
216211 try {
217- return new String (Base64 .getDecoder ().decode (compact ), StandardCharsets .UTF_8 );
212+ return new String (Base64 .getDecoder ().decode (value ), StandardCharsets .UTF_8 );
218213 } catch (IllegalArgumentException e ) {
219214 try {
220- return new String (Base64 .getUrlDecoder ().decode (compact ), StandardCharsets .UTF_8 );
215+ return new String (Base64 .getUrlDecoder ().decode (value ), StandardCharsets .UTF_8 );
221216 } catch (IllegalArgumentException e2 ) {
222217 LOGGER .log (
223218 Level .WARNING ,
You can’t perform that action at this time.
0 commit comments