moodle/lib
Iñaki Arenaza 67bebb69eb MDL-57558 ldap: fix ldap_get_entries_moodle()
While ldap_get_entries_moodle() PHPdocs state that it returns "array
ldap-entries with lower-cased attributes as indexes.", this is not true. It
uses ldap_get_attributes() internally, which returns both numerically indexed
attribute names, and dictionary-like entries indexed by attribute names.

Current code lowercases the dictionary-like entries, but then uses the
numerically indexed entries for the attribute names used as keys in the
returned array. The numerically indexed names might or might not be lowercased,
depending on the LDAP server and PHP version) version. E.g., OpenLDAP 2.x,
Novell eDirectory 8.x and MS Active Directory return mixed-cased attribute
names, and PHP 5.x and PHP 7.x don't lowercase them inside ldap_get_entries().

This is probably why all calls to ldap_get_entries_moodle() are followed by
calls to array_change_key_case(), even if that shouldn't be necessary.

So make sure we always return lower-cased attributs as indexes and add some
unit tests to avoid regressions in the future.
2017-05-16 10:48:27 +01:00
..
adodb MDL-55999 lib: Update thirdpartylibs.xml and readme_moodle.txt 2016-10-05 10:58:10 +08:00
ajax MDL-56958 ajax: Prefer the general renderer 2016-11-15 12:44:59 +08:00
amd MDL-58837 js: fix jsdoc error 2017-05-11 14:29:11 +01:00
antivirus/clamav MDL-58853 versions: bump all versions and requires near release 2017-05-09 02:58:28 +02:00
behat Merge branch 'wip-mdl-58068' of https://github.com/rajeshtaneja/moodle 2017-04-10 11:54:09 +08:00
bennu MDL-49111 bennu: remove outdated readme note 2016-01-13 11:31:55 +00:00
classes Merge branch 'MDL-58777-master' of git://github.com/cameron1729/moodle 2017-05-11 11:41:48 +08:00
db MDL-58777 core: Remove redundant refresh events tasks 2017-05-10 14:16:13 +08:00
ddl MDL-58593 database: More efficiently track issued key names 2017-04-13 12:21:13 -04:00
dml MDL-58689 dml: prevent logging during setup 2017-04-27 10:07:01 +08:00
dtl
editor MDL-58853 versions: bump all versions and requires near release 2017-05-09 02:58:28 +02:00
evalmath MDL-51784 general: Adding missing php4 style constructors 2015-12-11 14:02:42 +08:00
external MDL-57975 core: test for user date external function 2017-03-08 03:33:23 +00:00
filebrowser MDL-33741 file_info: show courses in hidden categories 2016-08-01 09:12:36 +08:00
filestorage MDL-58684 files: Ensure stored_file never serializes the file_storage 2017-05-08 11:12:39 +08:00
fonts MDL-40759 themes: font awesome support 2017-03-17 15:51:28 +08:00
form Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
google MDL-53512 libraries: update google API library to version 1.1.7 2016-03-22 08:38:11 +08:00
grade MDL-41809 course: do not rely on page context 2017-03-23 14:44:33 +08:00
horde MDL-52361 core: patch Horde library for PHP7 compatibility 2015-12-08 12:47:15 +08:00
html2text MDL-53896 core: Document Html2Text run-time overrides 2016-05-18 11:37:17 +08:00
htmlpurifier NOBUG: Fixed file access permissions 2016-10-20 17:52:32 +02:00
jabber MDL-52335 core: php7 compatibility in XMPP library 2015-12-02 14:00:58 +08:00
jquery MDL-56007 jquery: add back non-minified files 2016-10-04 11:16:29 +01:00
lessphp NOBUG: Fixed file access permissions 2016-03-24 12:58:10 +01:00
ltiprovider MDL-57704 ltiprovider: Don't force SSLv3 2017-05-02 09:33:18 +08:00
markdown MDL-53518 libraries: upgrade mardown to 1.6.0 version 2016-03-21 13:04:05 +08:00
maxmind MDL-48766 lib: Import MaxMind GeoIP2 PHP API 2016-09-19 08:59:38 +01:00
minify MDL-53695 minify: switch to MatthiasMullie\Minify 2016-10-10 13:17:04 +01:00
mustache MDL-56436 mustache: update import docs 2016-10-14 08:31:23 +01:00
password_compat/lib MDL-51758 libraries: Reworded password.php not required 2016-07-20 12:55:09 +08:00
pear MDL-56110 forms: debug message for php 7.1 compat 2016-10-13 09:18:34 +08:00
php-css-parser MDL-55381 php-css-parser: Patch for Sabberworm/PHP-CSS-Parser#115 2016-09-23 10:53:30 +01:00
phpexcel MDL-52336 core: patch PHPExcel for PHP7 compatibility 2015-12-08 12:13:48 +08:00
phpmailer MDL-57573 phpmailer: Update to version 5.2.23 2017-04-12 14:06:18 +02:00
phpunit MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests 2017-04-18 03:40:17 +02:00
portfolio MDL-58684 portfolio: use file id instead of stored_file 2017-05-04 10:00:54 +08:00
requirejs MDL-57049 libraries: update jqueryui version in requirejs path 2016-11-21 08:57:53 +08:00
rtlcss MDL-55224 core: Import RTLCSS-PHP into core 2016-09-23 10:49:49 +01:00
scssphp MDL-55285 core: Include library scssphp in core 2016-09-23 10:49:49 +01:00
simplepie NOBUG: Fixed file access permissions 2016-10-06 11:51:28 +02:00
spout MDL-56012 lib: Update of readme and xml file. 2016-10-04 10:47:06 +08:00
tcpdf NOBUG: Fixed file access permissions 2015-10-08 11:36:35 +01:00
templates MDL-58854 theme_boost: override templates for columns 2017-05-09 10:36:16 +08:00
testing MDL-57769 course: prepare to remove numsections option 2017-03-30 08:26:12 +08:00
tests MDL-57558 ldap: fix ldap_get_entries_moodle() 2017-05-16 10:48:27 +01:00
typo3
xhprof MDL-55921 profiling: Adding missing vars 2016-09-14 13:48:38 +10:00
xmldb MDL-53495 database xmldb: Use real length restriction. 2016-06-08 11:06:16 +10:00
yui Merge branch 'MDL-40759-master' of git://github.com/damyon/moodle 2017-03-20 13:57:38 +08:00
yuilib
accesslib.php MDL-51833 tool_monitor: Improve access check for monitor. 2017-02-27 08:59:45 +08:00
adminlib.php MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04:00
authlib.php Merge branch 'MDL-58631-master-authdoc' of git://github.com/mudrd8mz/moodle 2017-04-19 06:20:41 +08:00
badgeslib.php MDL-53718 badges: Dont display course badges when disabled 2016-11-07 15:56:26 +10:30
blocklib.php Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
boxlib.php MDL-49599 core: Fully deprecate the boxclient class 2016-07-19 14:44:51 +08:00
cacert.pem
cacert.txt
clilib.php MDL-51423 clilib: Fix the hard-coded English text with proper string 2015-09-17 21:12:46 +02:00
completionlib.php MDL-54751 core_completion: Exclude activities pending deletion 2016-11-07 07:41:59 +08:00
componentlib.class.php MDL-24343 core: Deprecate unzip_file 2016-08-03 09:05:55 +08:00
conditionlib.php MDL-44985 libraries: Final deprecation of conditional classes and apis 2014-12-10 12:20:37 +05:30
configonlylib.php MDL-56978 core: fix error handling in min_fix_utf8 2016-11-16 08:59:15 -08:00
cookies.js
coursecatlib.php MDL-58160 coursecat: Use set_many to populate category cache 2017-03-06 12:04:25 +10:30
cronlib.php MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
csslib.php MDL-57789 files: Reviewed lifetime value 2017-02-25 23:42:37 +01:00
csvlib.class.php MDL-47649 csvlib: must not leave files open 2014-10-14 10:36:25 +01:00
customcheckslib.php
dataformatlib.php MDL-51603 dataformats: coding_exception if output buffering 2016-04-21 16:20:36 +08:00
datalib.php MDL-58257 course: fix search containing a hyphen 2017-03-16 18:43:15 +01:00
ddllib.php MDL-50049 deprecation: Extra minor fixes. 2015-07-10 01:59:31 +02:00
default.ttf
deprecatedlib.php MDL-58803 calendar: Require calendar/lib.php 2017-05-04 13:03:55 +08:00
dmllib.php MDL-50049 deprecation: Extra minor fixes. 2015-07-10 01:59:31 +02:00
dtllib.php
editorlib.php MDL-31989 search: get_config method to search areas 2016-02-23 10:47:59 +00:00
emptyfile.php
enrollib.php MDL-58116 core_enrol: fix handling of users on different methods 2017-04-18 13:28:08 +02:00
environmentlib.php MDL-55121 environment: check for unsuported php version 7.1 2016-11-11 12:37:07 +08:00
eventslib.php MDL-48621 events: Adding debugging messages 2016-01-19 15:12:15 +08:00
excellib.class.php MDL-52983 excel output: avoid single quote on end of sheet name 2016-02-08 15:17:02 +10:30
externallib.php MDL-58701 phpunit: Add tests for external_settings 2017-04-27 09:37:53 +05:30
filelib.php MDL-58280 fileconverter_googledrive: Fix cibot complaints 2017-04-20 10:49:17 +08:00
filterlib.php MDL-58394 filters: Fixed order not being respected. 2017-04-03 14:47:44 +10:00
flickrlib.php
formslib.php Merge branch 'wip-MDL-34859-master' of git://github.com/marinaglancy/moodle 2017-03-20 07:54:22 +00:00
gdlib.php MDL-55445 gdlib: Support for resizing an image 2016-08-15 10:54:28 +08:00
googleapi.php MDL-40759 icons: convert uses of pix_url to pix_icon 2017-03-17 15:52:17 +08:00
gradelib.php MDL-37168 grade: Debugging if gradebook callbacks are not both present 2017-03-20 16:02:11 +08:00
graphlib.php MDL-51784 general: Adding missing php4 style constructors 2015-12-11 14:02:42 +08:00
grouplib.php MDL-57411 groups: Fix tests for MSSQL 2017-04-05 13:17:46 +02:00
index.html
installlib.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
javascript-static.js MDL-57687 js: Remove M.util.init_toggle_class_on_click 2017-02-08 11:09:54 +00:00
javascript.php MDL-53695 lib/javascript.php: ensure full env for core_minify 2016-10-10 13:17:04 +01:00
jslib.php MDL-57789 files: Reviewed lifetime value 2017-02-25 23:42:37 +01:00
ldaplib.php MDL-57558 ldap: fix ldap_get_entries_moodle() 2017-05-16 10:48:27 +01:00
lexer.php MDL-51784 general: Adding missing php4 style constructors 2015-12-11 14:02:42 +08:00
licenselib.php
listlib.php MDL-40759 icons: convert uses of pix_url to pix_icon 2017-03-17 15:52:17 +08:00
mathslib.php MDL-51784 general: Adding missing php4 style constructors 2015-12-11 14:02:42 +08:00
medialib.php MDL-38158 core_media: Convert media players to new plugin type 2016-11-04 17:30:40 +08:00
messagelib.php MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 15:46:48 +08:00
modinfolib.php MDL-58267 completion: allow to set default activity completion 2017-04-19 08:54:35 +08:00
moodlelib.php MDL-58267 completion: allow to set default activity completion 2017-04-19 08:54:35 +08:00
myprofilelib.php MDL-55345 user: correct userid when linking to iplookup from profile 2016-10-05 15:08:38 +01:00
navigationlib.php MDL-58138 completion: Assorted linting fixes. 2017-04-19 08:56:11 +08:00
oauthlib.php MDL-58535 oauth: Make the refreshtoken protected 2017-05-02 12:21:36 +08:00
odslib.class.php MDL-24343 core: Deprecate zip_files 2016-07-29 08:15:16 +08:00
outputactions.php MDL-55831 output: Convert action_link to template 2016-09-23 10:55:16 +01:00
outputcomponents.php MDL-58426 icons: Fix CSS for displaying big icons 2017-04-20 10:48:38 +02:00
outputfactories.php MDL-56958 ajax: Prefer the general renderer 2016-11-15 12:44:59 +08:00
outputfragmentrequirementslib.php MDL-52715 lib: Clean up of comments and variable names. 2016-02-03 10:07:08 +08:00
outputlib.php MDL-58538 core: Set proper PHP Documentation for pix_url() 2017-04-19 12:29:19 +08:00
outputrenderers.php MDL-58538 core: Set proper PHP Documentation for pix_url() 2017-04-19 12:29:19 +08:00
outputrequirementslib.php MDL-58936 core: ensure 'page->context' is not null 2017-05-15 12:29:15 +08:00
pagelib.php MDL-58138 completion: Fixes for a number of small issues. 2017-04-19 11:41:57 +08:00
pdflib.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
plagiarismlib.php MDL-52702 plagiarism: Improvements to base plugin class 2016-01-18 09:39:54 +00:00
portfoliolib.php MDL-40759 icons: convert uses of pix_url to pix_icon 2017-03-17 15:52:17 +08:00
questionlib.php MDL-56826 questions: Add styling for boost theme 2016-11-17 14:20:52 +08:00
recaptchalib.php MDL-56092 core_auth: Refactor recaptcha lib 2016-10-04 09:49:27 +01:00
requirejs.php MDL-55453 core_lib: Fix usage of js_send_uncached 2016-08-03 10:18:41 -07:00
resourcelib.php MDL-47995 lib: encode title properly, before additing it to image title 2015-06-04 11:13:00 +08:00
rsslib.php MDL-40759 icons: convert uses of pix_url to pix_icon 2017-03-17 15:52:17 +08:00
searchlib.php MDL-46929 mod_forum: Fix for edge cases when searching 2017-04-11 08:30:09 +01:00
sessionkeepalive_ajax.php MDL-35628 performance: Remove dirname() where possible. 2016-06-10 08:06:49 +10:00
sessionlib.php MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
setup.php MDL-57887 setup: Support logging usernames in nginx access logs 2017-02-07 13:47:40 +11:00
setuplib.php MDL-58857 admin: Terminate the session if a major upgrade is required 2017-05-09 15:00:00 +08:00
soaplib.php
statslib.php MDL-58756 stats: Use multilang with role. 2017-05-16 07:29:09 +02:00
tablelib.php MDL-55941 output: Refactor and improve initialbar UX to use templates 2017-03-24 20:31:03 +11:00
thirdpartylibs.xml Merge branch 'MDL-58549-master' of https://github.com/xow/moodle 2017-04-17 11:07:43 +01:00
tokeniserlib.php
upgrade.txt MDL-57558 ldap: fix ldap_get_entries_moodle() 2017-05-16 10:48:27 +01:00
upgradelib.php MDL-58793 auth: Do not report migrated settings as new ones on upgrade 2017-05-08 11:51:55 +02:00
uploadlib.php MDL-50887 antivirus: Deprecate functions no longer required. 2016-02-25 09:55:45 +00:00
validateurlsyntax.php
webdavlib.php MDL-56915 webdav: Increase maximum expected header size 2016-11-16 17:19:19 +08:00
weblib.php MDL-58479 documentation: fixed phpdoc for notice(). 2017-04-04 16:20:41 +10:00
wiki_to_markdown.php MDL-50268 core: proper deprecation of get_file_url() method 2016-01-18 13:44:22 +08:00
womenslib.php
wordlist.txt MDL-47050 core_wordlist: Updated wordlist to include only animals. 2014-11-04 09:03:08 +13:00
xhtml.xsl
xmlize.php
xsendfilelib.php