jakubgarfield / Bonobo-Git-Server

Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
http://bonobogitserver.com
MIT License
1.81k stars 603 forks source link

Null value in Roles-file causes issue during update #803

Open lafe opened 6 years ago

lafe commented 6 years ago

When I tried to update from 5.2 to 6.3, I encountered the following issue during migration:

System.ArgumentNullException: Value cannot be null. Parameter name: key at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) at Bonobo.Git.Server.Data.Update.ADBackendUpdate.Pre600UpdateTo600.UpdateRoles(String dir, Dictionary`2 users) at Bonobo.Git.Server.Data.Update.ADBackendUpdate.Pre600UpdateTo600.UpdateADBackend() at Bonobo.Git.Server.MvcApplication.Application_Start()

Reason for this error was that the roles JSON file contained the null value in the members array. As I never edited the files in "App_Data" manually, I suspect that there was an issue in a previous version that caused this.