mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 17:05:39 +02:00
Fix: dirty solution for non-alphanumeric symbols in SRS usernames #54
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
@@ -534,6 +535,7 @@ namespace Perun_v1
|
|||||||
// Take care of 3rd party stuff
|
// Take care of 3rd party stuff
|
||||||
string ExtSRSJson = "";
|
string ExtSRSJson = "";
|
||||||
string ExtLotATCJson = "";
|
string ExtLotATCJson = "";
|
||||||
|
string ClientName = "";
|
||||||
|
|
||||||
bool ExtSRSUseDefault = true;
|
bool ExtSRSUseDefault = true;
|
||||||
bool ExtLotATCUseDefault = true;
|
bool ExtLotATCUseDefault = true;
|
||||||
@@ -564,6 +566,14 @@ namespace Perun_v1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (raw_lotatc.Clients[i].Name != null)
|
||||||
|
{
|
||||||
|
ClientName = raw_lotatc.Clients[i].Name;
|
||||||
|
Regex rgx = new Regex("[^a-zA-Z0-9 -]");
|
||||||
|
ClientName = rgx.Replace(ClientName, "");
|
||||||
|
|
||||||
|
raw_lotatc.Clients[i].Name = ClientName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtSRSJson = JsonConvert.SerializeObject(raw_lotatc);
|
ExtSRSJson = JsonConvert.SerializeObject(raw_lotatc);
|
||||||
|
|||||||
Reference in New Issue
Block a user