Files
Chamilo/main/webservices/webservice-auth-ip.conf.dist.php
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

29 lines
975 B
PHP

<?php
/**
* This file allows a Chamilo portal admin to authorize access from specific
* IPs or ranges of IPs.
*/
/**
* Check no direct access to file using a constant defined in the calling script.
*/
if (!defined('WS_ERROR_SECRET_KEY')) {
exit();
}
/**
* Define here the IPs or ranges that will be authorized to access the
* webservice. When this is in place, the security key check will be made on
* the string given here in $ws_auth_ip, and not anymore on
* $_SERVER['REMOTE_ADDR'], but $_SERVER['REMOTE_ADDR'] will still be checked
* against the IP or range provided. It doesn't support IPv6 yet.
* If $ws_auth_ip is not defined, this file will be ignored. If $ws_auth_ip *is*
* defined, then the only security key expected from the client is the
* $_configuration['security_key'] encrypted through SHA1.
*
* @example
* <pre>
* $ws_auth_ip = '192.168.1.1/22';
* $ws_auth_ip = '192.168.1.5';
* $ws_auth_ip = '192.168.1.5,192.168.1.9';
* </pre>
*/