PluginProbe
The WP Remote WordPress Plugin / 4.86
The WP Remote WordPress Plugin v4.86
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | callback/streams.php +13 -16 5.224.86 View file →
@@ -44,26 +44,22 @@
44 44 }
45 45 return array('stream' => $stream);
46 46 }
47 47
48 - public function writeStream($chunk) {
49 - if (strlen($chunk) > 0) {
50 - $bvb64_prefix = "";
48 + public function writeStream($_string) {
49 + if (strlen($_string) > 0) {
50 + $chunk = "";
51 51 if ($this->bvb64stream) {
52 52 $chunk_size = $this->bvb64cksize;
53 - $chunk = $this->base64Encode($chunk, $chunk_size);
54 - $bvb64_prefix .= "BVB64" . ":";
53 + $_string = $this->base64Encode($_string, $chunk_size);
54 + $chunk .= "BVB64" . ":";
55 55 }
56 -
57 - $hash_prefix = "";
56 + $chunk .= (strlen($_string) . ":" . $_string);
58 57 if ($this->checksum == 'crc32') {
59 - $hash_prefix .= "CRC32" . ":" . crc32($chunk) . ":";
58 + $chunk = "CRC32" . ":" . crc32($_string) . ":" . $chunk;
60 59 } else if ($this->checksum == 'md5') {
61 - $hash_prefix .= "MD5" . ":" . md5($chunk) . ":";
60 + $chunk = "MD5" . ":" . md5($_string) . ":" . $chunk;
62 61 }
63 -
64 - $chunk = $hash_prefix . $bvb64_prefix . strlen($chunk) . ":" . $chunk;
65 -
66 62 $this->writeChunk($chunk);
67 63 }
68 64 }
69 65 }
@@ -72,11 +68,12 @@
72 68 function __construct($request) {
73 69 parent::__construct($request);
74 70 }
75 71
76 - public function writeChunk($chunk) {
77 - echo "ckckckckck".$chunk."ckckckckck";
72 + public function writeChunk($_string) {
73 + echo "ckckckckck".$_string."ckckckckck";
78 74 }
75 +
79 76 public function endStream() {
80 77 echo "rerererere";
81 78
82 79 return array();
@@ -210,9 +207,9 @@
210 207 stream_set_timeout($this->conn, 300);
211 208 while (!feof($this->conn)) {
212 209 $line = fgets($this->conn, 4096);
213 210 if (1 == $state) {
214 - if (!WPRHelper::safePregMatch('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) {
211 + if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) {
215 212 $response['httperror'] = "Status code line invalid: ".htmlentities($line);
216 213 return $response;
217 214 }
218 215 $response['http_version'] = $m[1];
@@ -225,9 +222,9 @@
225 222 if ($conlen > 0)
226 223 $response['body'] = fread($this->conn, $conlen);
227 224 return $response;
228 225 }
229 - if (!WPRHelper::safePregMatch('/([^:]+):\\s*(.*)/', $line, $m)) {
226 + if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) {
230 227 // Skip to the next header
231 228 continue;
232 229 }
233 230 $key = strtolower(trim($m[1]));