Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\files\curl_security_helper_base Class Reference

Security helper for the curl class. More...

Inheritance diagram for core\files\curl_security_helper_base:
core\files\curl_security_helper

Public Member Functions

 get_blocked_url_string ()
 Returns a string, explaining that a URL is blocked.
 
 url_is_blocked ($url)
 Check whether the input url should be blocked or not.
 

Detailed Description

Security helper for the curl class.

This class is intended as a base class for all curl security helpers. A curl security helper should provide a means to check a URL to determine whether curl should be allowed to request its content. It must also be able to return a simple string to explain that the URL is blocked, e.g. 'This URL is blocked'.

Curl security helpers are currently used by the 'curl' wrapper class in lib/filelib.php.

This class depends on:

  • nothing.
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Author
Jake Dallimore jrhda.nosp@m.llim.nosp@m.ore@g.nosp@m.mail.nosp@m..com

Member Function Documentation

◆ get_blocked_url_string()

core\files\curl_security_helper_base::get_blocked_url_string ( )
abstract

Returns a string, explaining that a URL is blocked.

Return values
stringthe lang string indicating that the url has been blocked.

Reimplemented in core\files\curl_security_helper.

◆ url_is_blocked()

core\files\curl_security_helper_base::url_is_blocked ( $url)
abstract

Check whether the input url should be blocked or not.

Parameters
string$urlthe url to check.
Return values
booltrue if the url is deemed to be blocked, false otherwise.

The documentation for this class was generated from the following file: