Properly escape the $ in $token for the auth dialog command

This commit is contained in:
Joseph Schorr 2014-09-02 16:45:25 -04:00
parent 07c7cdd51d
commit 53939f596d

View file

@ -2425,7 +2425,10 @@ quayApp.directive('dockerAuthDialog', function (Config) {
},
controller: function($scope, $element) {
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'];
};