Skip to content

Commit 95c44bd

Browse files
fix: fixing indentation
1 parent 042ed1f commit 95c44bd

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

fe/fe-common/src/main/java/org/apache/doris/common/ErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ public enum ErrorCode {
12361236
"Command only support in cloud mode."),
12371237

12381238
ERR_EMPTY_PASSWORD(6001, new byte[]{'4', '2', '0', '0', '0'},
1239-
"Access with empty password is prohibited for user %s because of current mode");
1239+
"Access with empty password is prohibited for user %s because of current mode");
12401240

12411241
// This is error code
12421242
private final int code;

fe/fe-core/src/main/java/org/apache/doris/mysql/authenticate/ldap/LdapAuthenticator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public boolean canDeal(String qualifiedUser) {
8484

8585
/**
8686
* The LDAP authentication process is as follows:
87-
* step1: Check the LDAP password (depending on value of property LdapConfig.ldap_allow_empty_pass login with empty pass can be prohibited).
87+
* step1: Check the LDAP password (if ldap_allow_empty_pass is false login with empty pass is prohibited).
8888
* step2: Get the LDAP groups privileges as a role, saved into ConnectContext.
8989
* step3: Set current userIdentity. If the user account does not exist in Doris, login as a temporary user.
9090
* Otherwise, login to the Doris account.
@@ -98,7 +98,8 @@ private AuthenticateResponse internalAuthenticate(String password, String qualif
9898

9999
//not allow to login in case when empty password is specified but such mode is disabled by configuration
100100
if (Strings.isNullOrEmpty(password) && !LdapConfig.ldap_allow_empty_pass) {
101-
LOG.info("user:{} is not allowed to login with LDAP with empty password because of ldap_allow_empty_pass is {}", userName, LdapConfig.ldap_allow_empty_pass);
101+
LOG.info("user:{} is not allowed to login to LDAP with empty password because ldap_allow_empty_pass:{}",
102+
userName, LdapConfig.ldap_allow_empty_pass);
102103
ErrorReport.report(ErrorCode.ERR_EMPTY_PASSWORD, qualifiedUser + "@" + remoteIp);
103104
return AuthenticateResponse.failedResponse;
104105
}

fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.apache.doris.datasource.CatalogIf;
4747
import org.apache.doris.datasource.InternalCatalog;
4848
import org.apache.doris.mysql.MysqlPassword;
49-
import org.apache.doris.mysql.authenticate.AuthenticateResponse;
5049
import org.apache.doris.mysql.authenticate.AuthenticateType;
5150
import org.apache.doris.mysql.authenticate.ldap.LdapManager;
5251
import org.apache.doris.mysql.authenticate.ldap.LdapUserInfo;

fe/fe-core/src/test/java/org/apache/doris/mysql/authenticate/ldap/LdapAuthenticatorTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.google.common.collect.Lists;
2929
import mockit.Expectations;
3030
import mockit.Mocked;
31-
3231
import org.junit.After;
3332
import org.junit.Assert;
3433
import org.junit.Test;
@@ -162,7 +161,7 @@ public void testEmptyPassword() throws IOException {
162161
//running test with specified value - false - ldap_allow_empty_pass is explicitly set to false
163162
LdapConfig.ldap_allow_empty_pass = false;
164163
response = ldapAuthenticator.authenticate(request);
165-
Assert.assertFalse(response.isSuccess());
164+
Assert.assertFalse(response.isSuccess());
166165
}
167166

168167
@After

0 commit comments

Comments
 (0)