LDAP Pagination #9709

Closed
opened 2025-11-02 08:47:16 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @plsnp on GitHub (Oct 19, 2022).

Description

Hello,

I'm getting this error in the gitea logs

2022/10/18 21:09:34 ...dap/source_search.go:520:SearchEntries() [E] [634ef9ee-22] LDAP Search failed unexpectedly! (LDAP Result Code 4 "Size Limit Exceeded": )
2022/10/18 21:09:34 .../ldap/source_sync.go:49:Sync() [E] [634ef9ee-22] SyncExternalUsers LDAP source failure [REDACTED], skipped

1000 is the default limit from what i've read online. My organization has more than 1000 users so this error can be correct. To solve it it is possible to set something on the server side to losen this limit

Linux: https://access.redhat.com/solutions/4526411
Windows: https://forums.ivanti.com/s/article/LDAP-Error-Search-Size-Limit-Exceeded?language=en_US

... however ...

there are also LDAP clients which support pagination. See: https://www.tirasa.net/en/blog/getting-around-active-directory-search

gitea should not just throw in an error but instead use pagination on the LDAP protocol when it is supported (from version 7.2 i read online)

Thanks for support

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

standalone binary from download page

Database

PostgreSQL

Originally created by @plsnp on GitHub (Oct 19, 2022). ### Description Hello, I'm getting this error in the gitea logs ``` 2022/10/18 21:09:34 ...dap/source_search.go:520:SearchEntries() [E] [634ef9ee-22] LDAP Search failed unexpectedly! (LDAP Result Code 4 "Size Limit Exceeded": ) 2022/10/18 21:09:34 .../ldap/source_sync.go:49:Sync() [E] [634ef9ee-22] SyncExternalUsers LDAP source failure [REDACTED], skipped ``` 1000 is the default limit from what i've read online. My organization has more than 1000 users so this error can be correct. To solve it it is possible to set something on the server side to losen this limit Linux: https://access.redhat.com/solutions/4526411 Windows: https://forums.ivanti.com/s/article/LDAP-Error-Search-Size-Limit-Exceeded?language=en_US ... however ... there are also LDAP clients which support pagination. See: https://www.tirasa.net/en/blog/getting-around-active-directory-search gitea should not just throw in an error but instead use pagination on the LDAP protocol when it is supported (from version 7.2 i read online) Thanks for support ### Gitea Version 1.17.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? standalone binary from download page ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 08:47:16 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Oct 20, 2022):

There is an option to enable paged searching when adding/editing the authentication source:

grafik

@KN4CK3R commented on GitHub (Oct 20, 2022): There is an option to enable paged searching when adding/editing the authentication source: ![grafik](https://user-images.githubusercontent.com/1666336/197054675-3626914f-1f01-4188-b70c-c1de7cfce2f7.png)
Author
Owner

@plsnp commented on GitHub (Oct 20, 2022):

Thanks @KN4CK3R that's cool.

The option could have been mentioned in the error message, or detection of the problem after which paged search can be enabled automatically. But seems like too low priority to keep this issue open.

Thanks for support

@plsnp commented on GitHub (Oct 20, 2022): Thanks @KN4CK3R that's cool. The option could have been mentioned in the error message, or detection of the problem after which paged search can be enabled automatically. But seems like too low priority to keep this issue open. Thanks for support
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9709