Merge pull request #10238 from akallabeth/krb-kdc-url

[sspi,krb] check for empty kdcUrl
This commit is contained in:
akallabeth 2024-06-03 13:01:24 +02:00 committed by GitHub
commit cbd2f5e65f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,7 @@
#include <freerdp/log.h>
#include "utils.h"
#include "credssp_auth.h"
#define TAG FREERDP_TAG("core.auth")
@ -197,7 +198,7 @@ static BOOL credssp_auth_client_init_cred_attributes(rdpCredsspAuth* auth)
{
WINPR_ASSERT(auth);
if (auth->kerberosSettings.kdcUrl)
if (!utils_str_is_empty(auth->kerberosSettings.kdcUrl))
{
SECURITY_STATUS status = ERROR_INTERNAL_ERROR;
SecPkgCredentials_KdcProxySettingsW* secAttr = NULL;

View File

@ -21,6 +21,8 @@
#error "This file must only be included with MIT kerberos"
#endif
#include <string.h>
#include <winpr/path.h>
#include <winpr/wlog.h>
#include <winpr/endian.h>
@ -171,7 +173,7 @@ krb5_error_code krb5glue_get_init_creds(krb5_context ctx, krb5_principal princ,
if (rv)
goto cleanup;
}
if (krb_settings->kdcUrl)
if (krb_settings->kdcUrl && (strnlen(krb_settings->kdcUrl, 2) > 0))
{
const char* names[4] = { 0 };
char* realm = NULL;