Skip to content

Commit 13b215c

Browse files
committed
Bug 1510346 - Handle null secret values
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510346
1 parent 766b9b8 commit 13b215c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/scripts/services/secrets.js

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ angular.module("openshiftConsole")
113113
var decodeSecretData = function(secretData) {
114114
var nonPrintable = {};
115115
var decodedSecret = _.mapValues(secretData, function(data, configType) {
116+
if (!data) {
117+
return '';
118+
}
116119
var decoded, isNonPrintable;
117120
if (configType === ".dockercfg" || configType === ".dockerconfigjson") {
118121
return decodeDockerConfig(data, configType);

dist/scripts/scripts.js

+1
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,7 @@ t.other.push(e);
32303230
},
32313231
decodeSecretData: function(e) {
32323232
var t = {}, n = _.mapValues(e, function(e, n) {
3233+
if (!e) return "";
32333234
var a;
32343235
return ".dockercfg" === n || ".dockerconfigjson" === n ? o(e, n) : (a = window.atob(e), /[\x00-\x09\x0E-\x1F]/.test(a) ? (t[n] = !0, e) : a);
32353236
});

0 commit comments

Comments
 (0)