We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.6中,由于安全性问题,这个方法会出现bug。 public static void SetPrivateKeyPath(string newPrivateKeyPath) { try { var privateKeyFile = new FileStream(newPrivateKeyPath, FileMode.Open); PrivateKey = FormatPrivateKey((new StreamReader(privateKeyFile)).ReadToEnd()); privateKeyFile.Close(); } catch (IOException ex) { throw new PingppException("Private key read error. " + ex); } } 请使用下面的安全方法: public static void SetPrivateKeyPath(string newPrivateKeyPath) { try { var privateKeyFile = new FileStream(newPrivateKeyPath, FileMode.Open); PrivateKey = FormatPrivateKey((new StreamReader(privateKeyFile)).ReadToEnd()); privateKeyFile.Close(); } catch (IOException ex) { throw new PingppException("Private key read error. " + ex); } }
The text was updated successfully, but these errors were encountered:
上下两段代码我没有看到任何区别,请再确认一下。
Sorry, something went wrong.
No branches or pull requests
4.6中,由于安全性问题,这个方法会出现bug。
public static void SetPrivateKeyPath(string newPrivateKeyPath)
{
try
{
var privateKeyFile = new FileStream(newPrivateKeyPath, FileMode.Open);
PrivateKey = FormatPrivateKey((new StreamReader(privateKeyFile)).ReadToEnd());
privateKeyFile.Close();
}
catch (IOException ex)
{
throw new PingppException("Private key read error. " + ex);
}
}
请使用下面的安全方法:
public static void SetPrivateKeyPath(string newPrivateKeyPath)
{
try
{
var privateKeyFile = new FileStream(newPrivateKeyPath, FileMode.Open);
PrivateKey = FormatPrivateKey((new StreamReader(privateKeyFile)).ReadToEnd());
privateKeyFile.Close();
}
catch (IOException ex)
{
throw new PingppException("Private key read error. " + ex);
}
}
The text was updated successfully, but these errors were encountered: