Browse Source

Node IDs are always upper case (ref #269)

Jakob Borg 11 years ago
parent
commit
e2cb0219c7
3 changed files with 3 additions and 2 deletions
  1. 0 0
      auto/gui.files.go
  2. 1 0
      config/config.go
  3. 2 2
      gui/app.js

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 1 - 0
config/config.go

@@ -191,6 +191,7 @@ func Load(rd io.Reader, myID string) (Configuration, error) {
 		// Strip spaces and dashes
 		node.NodeID = strings.Replace(node.NodeID, "-", "", -1)
 		node.NodeID = strings.Replace(node.NodeID, " ", "", -1)
+		node.NodeID = strings.ToUpper(node.NodeID)
 	}
 
 	// Check for missing, bad or duplicate repository ID:s

+ 2 - 2
gui/app.js

@@ -273,7 +273,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
             $scope.config.Options.ListenAddress = $scope.config.Options.ListenStr.split(',').map(function (x) { return x.trim(); });
             $http.post(urlbase + '/config', JSON.stringify($scope.config), {headers: {'Content-Type': 'application/json'}});
         }
-        
+
         $('#settings').modal("hide");
     };
 
@@ -340,7 +340,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
         $scope.configInSync = false;
         $('#editNode').modal('hide');
         nodeCfg = $scope.currentNode;
-        nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').replace(/-/g, '').trim();
+        nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').replace(/-/g, '').toUpperCase().trim();
         nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
 
         done = false;

Some files were not shown because too many files changed in this diff