Properly escape the $ in $token for the auth dialog command
This commit is contained in:
parent
07c7cdd51d
commit
53939f596d
1 changed files with 4 additions and 1 deletions
|
@ -2425,7 +2425,10 @@ quayApp.directive('dockerAuthDialog', function (Config) {
|
||||||
},
|
},
|
||||||
controller: function($scope, $element) {
|
controller: function($scope, $element) {
|
||||||
var updateCommand = function() {
|
var updateCommand = function() {
|
||||||
$scope.command = 'docker login -e="." -u="' + $scope.username +
|
var escape = function(v) {
|
||||||
|
return v.replace('$', '\\$');
|
||||||
|
};
|
||||||
|
$scope.command = 'docker login -e="." -u="' + escape($scope.username) +
|
||||||
'" -p="' + $scope.token + '" ' + Config['SERVER_HOSTNAME'];
|
'" -p="' + $scope.token + '" ' + Config['SERVER_HOSTNAME'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue