Changesets: MantisBT

master e32a8959

2020-01-28 07:08:22

dregad

Details Diff
Merge remote-tracking branch 'origin/master-2.23'
Attach Issues:
mod - core/ldap_api.php Diff File
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File

master-2.23 d4d8321e

2020-01-28 07:05:09

dregad

Details Diff
LDAP API performance, logging & docs improvements

PR https://github.com/mantisbt/mantisbt/pull/1614
Attach Issues:
mod - core/ldap_api.php Diff File
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File

master-2.23 36f07898

2020-01-27 07:33:20

dregad

Details Diff
Add filter to log message when ldap_search() fails
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 6e630772

2020-01-27 07:29:30

dregad

Details Diff
Improve comment before ldap_connect_bind() call

Explain why
- we suppress errors in ldap_cache_user_data()
- it's useless to check for failures in ldap_authenticate_by_username()
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 212d1834

2020-01-27 07:26:59

dregad

Details Diff
Fix PHP warning when ldap_connect_bind() fails

ldap_errno() / ldap_error() expect a resource, but the link identifier
is `false`.

- ldap_cache_user_data(): replace ldap_log_error() by a generic
log_event() call
- ldap_authenticate_by_username(): remove the whole if statement, which
is useless as ldap_connect_bind() will throw an error that will halt
program execution if the connection fails.

Fixes 0026629
Affected Issues
0026629
mod - core/ldap_api.php Diff File

master-2.23 f91d60a2

2020-01-27 07:20:36

dregad

Details Diff
Remove unnecessary log message

It is redundant for callers of ldap_connect_bind() to log a message
before executing the function, since it does so already.
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 482ef7a9

2020-01-27 07:18:46

dregad

Details Diff
Return immediately if ldap_connect() fails

Simplify ldap_connect_bind() function flow by returning after calling
ldap_connect() if it fails.

Note that `return false` is required, as the function may be called with
error suppressed.
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 806f3ccf

2020-01-27 07:13:14

dregad

Details Diff
Document LDAP PHP extension as optional requirement
Attach Issues:
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File

master 50fe2448

2020-01-24 11:07:20

dregad

Details Diff
Use button tag instead of input type submit
Attach Issues:
mod - api_tokens_page.php Diff File

master dc699783

2020-01-24 11:06:11

dregad

Details Diff
API token input is now required

Add required attribute on the input, and asterisk in front of label.

Fixes 0026623
Affected Issues
0026623
mod - api_tokens_page.php Diff File

master-2.23 5c69a22d

2020-01-24 04:28:59

dregad

Details Diff
Remove unnecessary ldap_free_result() calls

According to PHP documentation [[1]], freeing results is only needed
when making successive searches which return large result sets. This is
not our case, since even though we do make multiple searches, they
normally only return a single entry.

[1]: https://www.php.net/manual/en/function.ldap-free-result.php
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 dbf0fb59

2020-01-24 04:23:53

dregad

Details Diff
Coding guidelines
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 28336ef3

2020-01-23 11:45:48

dregad

Details Diff
Use ldap_realname_from_username()

Since we already know the username, we can avoid calling the id-based
ldap_realname() wrapper.
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 2ed3e3ef

2020-01-23 11:43:48

dregad

Details Diff
Log LDAP bind dn account name
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 709fb78e

2020-01-23 11:32:07

dregad

Details Diff
Reduce number of LDAP searches

Prior to this, retrieving user information required 1 LDAP search each
time a user was referenced on a page (possibly 2 if Mantis is configured
to show the realname). This could have a significant performance impact
when displaying pages containing a large number of users (e.g. viewing
an Issue having a long history, as described in issue 0026600).

Implement a new ldap_cache_user_data() function to retrieve all needed
LDAP attributes in a single search, and cache them.

This way, we only need to query the LDAP server once per user,
subsequent calls only need to access the cache which drastically
improves performance.

Fixes 0026622, 0026600
Affected Issues
0026600, 0026622
mod - core/ldap_api.php Diff File

master-2.23 461faac7

2020-01-23 11:01:28

dregad

Details Diff
Move caching to ldap_get_field_from_username()

Having the logic to cache LDAP data in ldap_email_from_username() and
ldap_realname_from_username() introduced code duplication.

Since both functions rely on ldap_get_field_from_username() to retrieve
data from LDAP, it makes more sense to process the cache there.
Attach Issues:
mod - core/ldap_api.php Diff File

master 71a8380b

2020-01-23 10:13:22

translatewiki.net

Details Diff
Localisation updates from https://translatewiki.net.
Attach Issues:
mod - lang/strings_portuguese_brazil.txt Diff File

master 26ad5e59

2020-01-22 02:15:17

atrol

Details Diff
Merge branch 'master-2.23'
Attach Issues:
mod - bug_view_inc.php Diff File
mod - core/commands/IssueViewPageCommand.php Diff File

master-2.23 806486d3

2020-01-21 07:33:59

dregad

Details Diff
LDAP cache realname also

Until now, the cache was only storing e-mail, realname was always
fetched from the LDAP server.

The $g_cache_ldap_email global variable was renamed $g_cache_ldap_data
to reflect its more general purpose.
Attach Issues:
mod - core/ldap_api.php Diff File

master-2.23 91205d2d

2020-01-21 07:30:31

dregad

Details Diff
LDAP cache by username instead of id

Until now, LDAP API was caching users' e-mail based on their ID.

Since LDAP API works with username (the ID-based functions are simple
wrappers for their username-based counterparts), it makes more sense to
change the cache to use the username as key.
Attach Issues:
mod - core/ldap_api.php Diff File

master 83640b9e

2020-01-20 05:36:24

translatewiki.net

Details Diff
Localisation updates from https://translatewiki.net.
Attach Issues:
mod - lang/strings_belarusian_tarask.txt Diff File
mod - lang/strings_chinese_simplified.txt Diff File
mod - lang/strings_macedonian.txt Diff File
mod - lang/strings_turkish.txt Diff File

master e26eabfb

2020-01-19 18:33:44

cproensa


Committer: dregad Details Diff
Improve MantisColumn sort support

Allow including select elements from the sort method in MantisColumn
when building the filter sql query.

Fixes: 0026612
Affected Issues
0026612
mod - core/classes/BugFilterQuery.class.php Diff File

master 6fd3aa63

2020-01-19 11:51:56

cproensa


Committer: dregad Details Diff
Clean up code and comments
Attach Issues:
mod - core/classes/BugFilterQuery.class.php Diff File

master ec75a98d

2020-01-19 11:49:11

cproensa


Committer: dregad Details Diff
BugFilterQuery check for later modifications

The internal sql query is built and ready after the constructor method,
and regenerated after changing query type with set_query_type().
However, if externally adding clauses throguh add_join(), add_where(),
etc, those new parts are not translated to the final query
automatically.

Add a flag that keeps track of the modified state, so if the query is
executed after modifications, the internal sql is rebuilt.

Fixes: 0024600
Affected Issues
0024600
mod - core/classes/BugFilterQuery.class.php Diff File

master 55fb5721

2020-01-18 14:52:34

atrol

Details Diff
Correct log message in function ldap_simulatiom_realname_from_username
Attach Issues:
mod - core/ldap_api.php Diff File
1 2 3 ... 60 ... 120 ... 180 ... 240 ... 300 ... 360 ... 420 ... 480 ... 540 ... 600 ... 626 627 628  Next  Last