From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- srcs/wordpress/wp-includes/Requests/Auth/Basic.php | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 srcs/wordpress/wp-includes/Requests/Auth/Basic.php (limited to 'srcs/wordpress/wp-includes/Requests/Auth/Basic.php') diff --git a/srcs/wordpress/wp-includes/Requests/Auth/Basic.php b/srcs/wordpress/wp-includes/Requests/Auth/Basic.php deleted file mode 100644 index a355cfd..0000000 --- a/srcs/wordpress/wp-includes/Requests/Auth/Basic.php +++ /dev/null @@ -1,88 +0,0 @@ -user, $this->pass) = $args; - } - } - - /** - * Register the necessary callbacks - * - * @see curl_before_send - * @see fsockopen_header - * @param Requests_Hooks $hooks Hook system - */ - public function register(Requests_Hooks &$hooks) { - $hooks->register('curl.before_send', array(&$this, 'curl_before_send')); - $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header')); - } - - /** - * Set cURL parameters before the data is sent - * - * @param resource $handle cURL resource - */ - public function curl_before_send(&$handle) { - curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - curl_setopt($handle, CURLOPT_USERPWD, $this->getAuthString()); - } - - /** - * Add extra headers to the request before sending - * - * @param string $out HTTP header string - */ - public function fsockopen_header(&$out) { - $out .= sprintf("Authorization: Basic %s\r\n", base64_encode($this->getAuthString())); - } - - /** - * Get the authentication string (user:pass) - * - * @return string - */ - public function getAuthString() { - return $this->user . ':' . $this->pass; - } -} \ No newline at end of file -- cgit