mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-24 02:00:27 +02:00
GSSProvider: Properly handle invalid SPNEGO Token
This commit is contained in:
parent
477af8e690
commit
97a48adf4a
1 changed files with 9 additions and 1 deletions
|
@ -54,7 +54,15 @@ namespace SMBLibrary.Authentication.GSSAPI
|
|||
public virtual NTStatus AcceptSecurityContext(ref GSSContext context, byte[] inputToken, out byte[] outputToken)
|
||||
{
|
||||
outputToken = null;
|
||||
SimpleProtectedNegotiationToken spnegoToken = SimpleProtectedNegotiationToken.ReadToken(inputToken, 0);
|
||||
SimpleProtectedNegotiationToken spnegoToken = null;
|
||||
try
|
||||
{
|
||||
spnegoToken = SimpleProtectedNegotiationToken.ReadToken(inputToken, 0);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
if (spnegoToken != null)
|
||||
{
|
||||
if (spnegoToken is SimpleProtectedNegotiationTokenInit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue