mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-11-14 11:18:14 +11:00
main: Added API key regex match
This commit is contained in:
parent
10662f5910
commit
2e6f38d832
@ -7,6 +7,7 @@ using System.Linq;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
@ -287,6 +288,14 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
if (checkBoxRunHSD.Checked)
|
if (checkBoxRunHSD.Checked)
|
||||||
{
|
{
|
||||||
|
if (!Regex.IsMatch(textBoxNodeKey.Text, @"^[a-zA-Z0-9]+$"))
|
||||||
|
{
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Please enter valid API key\nDo not use spaces or weird stuff");
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
StreamWriter sw = new StreamWriter(dir + "node.txt");
|
StreamWriter sw = new StreamWriter(dir + "node.txt");
|
||||||
sw.WriteLine("IP: " + textBoxNodeIP.Text);
|
sw.WriteLine("IP: " + textBoxNodeIP.Text);
|
||||||
sw.WriteLine("Network: " + comboBoxNodeNetwork.SelectedIndex);
|
sw.WriteLine("Network: " + comboBoxNodeNetwork.SelectedIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user