소스 검색

Added direct load prevention in web service (BT#4158)

Yannick Warnier 12 년 전
부모
커밋
da44b66e5e
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      main/webservices/webservice-auth-ip.conf.php

+ 4 - 0
main/webservices/webservice-auth-ip.conf.php

@@ -3,6 +3,10 @@
  * 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')) { die(); }
 /**
  * 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