File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,19 @@ public function authenticate(array &$state): void
174174 }
175175
176176 Assert::true (is_string ($ this ->spn ) || (is_int ($ this ->spn ) && ($ this ->spn === 0 )) || is_null ($ this ->spn ));
177- $ auth = new \KRB5NegotiateAuth ($ this ->keytab , $ this ->spn );
177+
178+ if (version_compare (phpversion ('krb5 ' ), '1.1.3 ' , '< ' )) {
179+ $ auth = new \KRB5NegotiateAuth ($ this ->keytab );
180+ } elseif (version_compare (phpversion ('krb5 ' ), '1.1.3 ' , 'eq ' ) && is_null ($ this ->spn )) {
181+ /**
182+ * This is a workaround for a bug in krb5 v1.1.3 that has been fixed in SVN, just not yet released.
183+ * Once v1.1.4 is released, get rid of the elseif-clause and then make sure to mark the
184+ * v.1.1.3 version of the extension as a conflict in the composer.json file.
185+ */
186+ $ auth = new \KRB5NegotiateAuth ($ this ->keytab );
187+ } else {
188+ $ auth = new \KRB5NegotiateAuth ($ this ->keytab , $ this ->spn );
189+ }
178190
179191 // attempt Kerberos authentication
180192 try {
You can’t perform that action at this time.
0 commit comments