run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
23.8 KB
2026-03-11 16:18:51
R W Run
7.8 KB
2026-03-11 16:18:52
R W Run
36.1 KB
2026-03-11 16:18:51
R W Run
11.9 KB
2026-03-11 16:18:52
R W Run
18.94 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:52
R W Run
28.6 KB
2026-03-11 16:18:51
R W Run
316 By
2026-03-11 16:18:51
R W Run
12.9 KB
2026-03-11 16:18:51
R W Run
61.02 KB
2026-03-11 16:18:52
R W Run
15 KB
2026-03-11 16:18:51
R W Run
112.05 KB
2026-03-11 16:18:51
R W Run
12.47 KB
2026-03-11 16:18:51
R W Run
15.07 KB
2026-03-11 16:18:52
R W Run
9.84 KB
2026-03-11 16:18:52
R W Run
13.17 KB
2026-03-11 16:18:52
R W Run
33.83 KB
2026-03-11 16:18:51
R W Run
42.63 KB
2026-03-11 16:18:51
R W Run
55.71 KB
2026-03-11 16:18:52
R W Run
12.53 KB
2026-03-11 16:18:51
R W Run
2.55 KB
2026-03-11 16:18:52
R W Run
28.92 KB
2026-03-11 16:18:52
R W Run
539 By
2026-03-11 16:18:51
R W Run
367 By
2026-03-11 16:18:52
R W Run
42.65 KB
2026-03-11 16:18:51
R W Run
401 By
2026-03-11 16:18:51
R W Run
6.61 KB
2026-03-11 16:18:51
R W Run
664 By
2026-03-11 16:18:52
R W Run
20.63 KB
2026-03-11 16:18:51
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
453 By
2026-03-11 16:18:52
R W Run
457 By
2026-03-11 16:18:51
R W Run
36.83 KB
2026-03-11 16:18:52
R W Run
2.41 KB
2026-03-11 16:18:52
R W Run
8.28 KB
2026-03-11 16:18:51
R W Run
13.89 KB
2026-03-11 16:18:51
R W Run
11.76 KB
2026-03-11 16:18:51
R W Run
2.65 KB
2026-03-11 16:18:51
R W Run
7.43 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
5.14 KB
2026-03-11 16:18:52
R W Run
16.7 KB
2026-03-11 16:18:51
R W Run
8.28 KB
2026-03-11 16:18:52
R W Run
2.92 KB
2026-03-11 16:18:52
R W Run
1.32 KB
2026-03-11 16:18:51
R W Run
4.6 KB
2026-03-11 16:18:52
R W Run
11.62 KB
2026-03-11 16:18:52
R W Run
2.5 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
11.25 KB
2026-03-11 16:18:52
R W Run
5.32 KB
2026-03-11 16:18:51
R W Run
10.99 KB
2026-03-11 16:18:52
R W Run
68.32 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:51
R W Run
5.49 KB
2026-03-11 16:18:51
R W Run
1.99 KB
2026-03-11 16:18:52
R W Run
7.02 KB
2026-03-11 16:18:51
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
16.86 KB
2026-03-11 16:18:51
R W Run
24.23 KB
2026-03-11 16:18:51
R W Run
3.97 KB
2026-03-11 16:18:51
R W Run
47.66 KB
2026-03-11 16:18:51
R W Run
9.22 KB
2026-03-11 16:18:51
R W Run
25.51 KB
2026-03-11 16:18:51
R W Run
198.38 KB
2026-03-11 16:18:52
R W Run
56.65 KB
2026-03-11 16:18:51
R W Run
10.46 KB
2026-03-11 16:18:51
R W Run
10.95 KB
2026-03-11 16:18:52
R W Run
29.26 KB
2026-03-11 16:18:51
R W Run
70.91 KB
2026-03-11 16:18:52
R W Run
35.3 KB
2026-03-11 16:18:52
R W Run
16.61 KB
2026-03-11 16:18:52
R W Run
2.57 KB
2026-03-11 16:18:52
R W Run
39.83 KB
2026-03-11 16:18:51
R W Run
70.64 KB
2026-03-11 16:18:51
R W Run
15.56 KB
2026-03-11 16:18:52
R W Run
7.33 KB
2026-03-11 16:18:52
R W Run
253 By
2026-03-11 16:18:51
R W Run
7.96 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
969 By
2026-03-11 16:18:52
R W Run
16.28 KB
2026-03-11 16:18:51
R W Run
7.22 KB
2026-03-11 16:18:51
R W Run
12.95 KB
2026-03-11 16:18:51
R W Run
6.53 KB
2026-03-11 16:18:51
R W Run
3.42 KB
2026-03-11 16:18:52
R W Run
5.84 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
4.3 KB
2026-03-11 16:18:52
R W Run
2.91 KB
2026-03-11 16:18:51
R W Run
16.46 KB
2026-03-11 16:18:52
R W Run
40.6 KB
2026-03-11 16:18:51
R W Run
20.22 KB
2026-03-11 16:18:51
R W Run
36.11 KB
2026-03-11 16:18:52
R W Run
17.01 KB
2026-03-11 16:18:51
R W Run
7.27 KB
2026-03-11 16:18:52
R W Run
6.62 KB
2026-03-11 16:18:52
R W Run
16.49 KB
2026-03-11 16:18:52
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
29.82 KB
2026-03-11 16:18:51
R W Run
6.67 KB
2026-03-11 16:18:52
R W Run
8.98 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:51
R W Run
12.01 KB
2026-03-11 16:18:51
R W Run
17.11 KB
2026-03-11 16:18:51
R W Run
6.74 KB
2026-03-11 16:18:52
R W Run
30.93 KB
2026-03-11 16:18:51
R W Run
4.99 KB
2026-03-11 16:18:51
R W Run
4.25 KB
2026-03-11 16:18:51
R W Run
24.72 KB
2026-03-11 16:18:51
R W Run
29.96 KB
2026-03-11 16:18:52
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
160 KB
2026-03-11 16:18:51
R W Run
6.72 KB
2026-03-11 16:18:52
R W Run
10.92 KB
2026-03-11 16:18:51
R W Run
4.77 KB
2026-03-11 16:18:51
R W Run
3.38 KB
2026-03-11 16:18:51
R W Run
11.18 KB
2026-03-11 16:18:51
R W Run
62.19 KB
2026-03-11 16:18:51
R W Run
2.46 KB
2026-03-11 16:18:51
R W Run
9.17 KB
2026-03-11 16:18:51
R W Run
32.15 KB
2026-03-11 16:18:51
R W Run
34.05 KB
2026-03-11 16:18:52
R W Run
7.15 KB
2026-03-11 16:18:51
R W Run
3.47 KB
2026-03-11 16:18:52
R W Run
1.87 KB
2026-03-11 16:18:52
R W Run
30.91 KB
2026-03-11 16:18:51
R W Run
7.29 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:51
R W Run
12.54 KB
2026-03-11 16:18:51
R W Run
19.12 KB
2026-03-11 16:18:51
R W Run
18.12 KB
2026-03-11 16:18:52
R W Run
39.99 KB
2026-03-11 16:18:52
R W Run
5.17 KB
2026-03-11 16:18:52
R W Run
979 By
2026-03-11 16:18:51
R W Run
18.44 KB
2026-03-11 16:18:52
R W Run
10.24 KB
2026-03-11 16:18:51
R W Run
1.77 KB
2026-03-11 16:18:52
R W Run
34.9 KB
2026-03-11 16:18:51
R W Run
7.19 KB
2026-03-11 16:18:52
R W Run
160.5 KB
2026-03-11 16:18:51
R W Run
64.27 KB
2026-03-11 16:18:51
R W Run
27.95 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
2.94 KB
2026-03-11 16:18:51
R W Run
43.13 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
22.5 KB
2026-03-11 16:18:51
R W Run
13.01 KB
2026-03-11 16:18:52
R W Run
3.27 KB
2026-03-11 16:18:51
R W Run
18 KB
2026-03-11 16:18:51
R W Run
210.4 KB
2026-03-11 16:18:52
R W Run
25.86 KB
2026-03-11 16:18:52
R W Run
115.85 KB
2026-03-11 16:18:51
R W Run
373 By
2026-03-11 16:18:52
R W Run
343 By
2026-03-11 16:18:52
R W Run
338 By
2026-03-11 16:18:51
R W Run
100.73 KB
2026-03-11 16:18:52
R W Run
130.93 KB
2026-03-11 16:18:51
R W Run
19.1 KB
2026-03-11 16:18:51
R W Run
17.41 KB
2026-03-11 16:18:52
R W Run
41.98 KB
2026-03-11 16:18:52
R W Run
400 By
2026-03-11 16:18:52
R W Run
11.1 KB
2026-03-11 16:18:52
R W Run
37.02 KB
2026-03-11 16:18:51
R W Run
2.24 KB
2026-03-11 16:18:51
R W Run
188.13 KB
2026-03-11 16:18:51
R W Run
338 By
2026-03-11 16:18:51
R W Run
38 KB
2026-03-11 16:18:51
R W Run
4.02 KB
2026-03-11 16:18:52
R W Run
5.38 KB
2026-03-11 16:18:51
R W Run
3.05 KB
2026-03-11 16:18:52
R W Run
2.61 KB
2026-03-11 16:18:51
R W Run
1.16 KB
2026-03-11 16:18:52
R W Run
4.04 KB
2026-03-11 16:18:51
R W Run
3.71 KB
2026-03-11 16:18:51
R W Run
24.6 KB
2026-03-11 16:18:51
R W Run
9.56 KB
2026-03-11 16:18:51
R W Run
346.43 KB
2026-03-11 16:18:52
R W Run
281.84 KB
2026-03-11 16:18:52
R W Run
14.95 KB
2026-03-11 16:18:51
R W Run
8.44 KB
2026-03-11 16:18:52
R W Run
168.95 KB
2026-03-11 16:18:52
R W Run
20.71 KB
2026-03-11 16:18:52
R W Run
25.27 KB
2026-03-11 16:18:51
R W Run
5.72 KB
2026-03-11 16:18:51
R W Run
4.63 KB
2026-03-11 16:18:52
R W Run
81.73 KB
2026-03-11 16:18:51
R W Run
67.18 KB
2026-03-11 16:18:51
R W Run
156.36 KB
2026-03-11 16:18:52
R W Run
55.19 KB
2026-03-11 16:18:51
R W Run
162 By
2026-03-11 16:18:51
R W Run
61.72 KB
2026-03-11 16:18:51
R W Run
216.06 KB
2026-03-11 16:18:52
R W Run
65.09 KB
2026-03-11 16:18:51
R W Run
25.24 KB
2026-03-11 16:18:52
R W Run
4.81 KB
2026-03-11 16:18:51
R W Run
6.48 KB
2026-03-11 16:18:52
R W Run
21.25 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:52
R W Run
89.69 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.11 KB
2026-03-11 16:18:51
R W Run
40.74 KB
2026-03-11 16:18:51
R W Run
25.38 KB
2026-03-11 16:18:51
R W Run
43.31 KB
2026-03-11 16:18:52
R W Run
102.57 KB
2026-03-11 16:18:52
R W Run
6.18 KB
2026-03-11 16:18:51
R W Run
124.47 KB
2026-03-11 16:18:52
R W Run
35.65 KB
2026-03-11 16:18:52
R W Run
6.94 KB
2026-03-11 16:18:52
R W Run
67.04 KB
2026-03-11 16:18:52
R W Run
10.62 KB
2026-03-11 16:18:51
R W Run
289.35 KB
2026-03-11 16:18:52
R W Run
36.23 KB
2026-03-11 16:18:51
R W Run
200 By
2026-03-11 16:18:52
R W Run
200 By
2026-03-11 16:18:52
R W Run
98.29 KB
2026-03-11 16:18:52
R W Run
30.02 KB
2026-03-11 16:18:52
R W Run
19.03 KB
2026-03-11 16:18:52
R W Run
5.06 KB
2026-03-11 16:18:52
R W Run
255 By
2026-03-11 16:18:51
R W Run
22.66 KB
2026-03-11 16:18:52
R W Run
154.63 KB
2026-03-11 16:18:51
R W Run
9.68 KB
2026-03-11 16:18:51
R W Run
258 By
2026-03-11 16:18:51
R W Run
23.49 KB
2026-03-11 16:18:51
R W Run
3.16 KB
2026-03-11 16:18:51
R W Run
8.4 KB
2026-03-11 16:18:52
R W Run
441 By
2026-03-11 16:18:51
R W Run
7.39 KB
2026-03-11 16:18:51
R W Run
173 KB
2026-03-11 16:18:52
R W Run
544 By
2026-03-11 16:18:52
R W Run
4.17 KB
2026-03-11 16:18:51
R W Run
35.97 KB
2026-03-11 16:18:52
R W Run
1.69 KB
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:52
R W Run
6.09 KB
2026-03-11 16:18:51
R W Run
8.71 KB
2026-03-11 16:18:51
R W Run
131.84 KB
2026-03-11 16:18:51
R W Run
37.45 KB
2026-03-11 16:18:51
R W Run
173.89 KB
2026-03-11 16:18:51
R W Run
7.09 KB
2026-03-11 16:18:51
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
1.08 KB
2026-03-11 16:18:51
R W Run
69.46 KB
2026-03-11 16:18:52
R W Run
445 By
2026-03-11 16:18:51
R W Run
799 By
2026-03-11 16:18:52
R W Run
error_log
📄class-wp-http-cookie.php
1<?php
2/**
3 * HTTP API: WP_Http_Cookie class
4 *
5 * @package WordPress
6 * @subpackage HTTP
7 * @since 4.4.0
8 */
9
10/**
11 * Core class used to encapsulate a single cookie object for internal use.
12 *
13 * Returned cookies are represented using this class, and when cookies are set, if they are not
14 * already a WP_Http_Cookie() object, then they are turned into one.
15 *
16 * @todo The WordPress convention is to use underscores instead of camelCase for function and method
17 * names. Need to switch to use underscores instead for the methods.
18 *
19 * @since 2.8.0
20 */
21#[AllowDynamicProperties]
22class WP_Http_Cookie {
23
24 /**
25 * Cookie name.
26 *
27 * @since 2.8.0
28 *
29 * @var string
30 */
31 public $name;
32
33 /**
34 * Cookie value.
35 *
36 * @since 2.8.0
37 *
38 * @var string
39 */
40 public $value;
41
42 /**
43 * When the cookie expires. Unix timestamp or formatted date.
44 *
45 * @since 2.8.0
46 *
47 * @var string|int|null
48 */
49 public $expires;
50
51 /**
52 * Cookie URL path.
53 *
54 * @since 2.8.0
55 *
56 * @var string
57 */
58 public $path;
59
60 /**
61 * Cookie Domain.
62 *
63 * @since 2.8.0
64 *
65 * @var string
66 */
67 public $domain;
68
69 /**
70 * Cookie port or comma-separated list of ports.
71 *
72 * @since 2.8.0
73 *
74 * @var int|string
75 */
76 public $port;
77
78 /**
79 * host-only flag.
80 *
81 * @since 5.2.0
82 *
83 * @var bool
84 */
85 public $host_only;
86
87 /**
88 * Sets up this cookie object.
89 *
90 * The parameter $data should be either an associative array containing the indices names below
91 * or a header string detailing it.
92 *
93 * @since 2.8.0
94 * @since 5.2.0 Added `host_only` to the `$data` parameter.
95 *
96 * @param string|array $data {
97 * Raw cookie data as header string or data array.
98 *
99 * @type string $name Cookie name.
100 * @type mixed $value Value. Should NOT already be urlencoded.
101 * @type string|int|null $expires Optional. Unix timestamp or formatted date. Default null.
102 * @type string $path Optional. Path. Default '/'.
103 * @type string $domain Optional. Domain. Default host of parsed $requested_url.
104 * @type int|string $port Optional. Port or comma-separated list of ports. Default null.
105 * @type bool $host_only Optional. host-only storage flag. Default true.
106 * }
107 * @param string $requested_url The URL which the cookie was set on, used for default $domain
108 * and $port values.
109 */
110 public function __construct( $data, $requested_url = '' ) {
111 if ( $requested_url ) {
112 $parsed_url = parse_url( $requested_url );
113 }
114 if ( isset( $parsed_url['host'] ) ) {
115 $this->domain = $parsed_url['host'];
116 }
117 $this->path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '/';
118 if ( ! str_ends_with( $this->path, '/' ) ) {
119 $this->path = dirname( $this->path ) . '/';
120 }
121
122 if ( is_string( $data ) ) {
123 // Assume it's a header string direct from a previous request.
124 $pairs = explode( ';', $data );
125
126 // Special handling for first pair; name=value. Also be careful of "=" in value.
127 $name = trim( substr( $pairs[0], 0, strpos( $pairs[0], '=' ) ) );
128 $value = substr( $pairs[0], strpos( $pairs[0], '=' ) + 1 );
129 $this->name = $name;
130 $this->value = urldecode( $value );
131
132 // Removes name=value from items.
133 array_shift( $pairs );
134
135 // Set everything else as a property.
136 foreach ( $pairs as $pair ) {
137 $pair = rtrim( $pair );
138
139 // Handle the cookie ending in ; which results in an empty final pair.
140 if ( empty( $pair ) ) {
141 continue;
142 }
143
144 list( $key, $val ) = strpos( $pair, '=' ) ? explode( '=', $pair ) : array( $pair, '' );
145 $key = strtolower( trim( $key ) );
146 if ( 'expires' === $key ) {
147 $val = strtotime( $val );
148 }
149 $this->$key = $val;
150 }
151 } else {
152 if ( ! isset( $data['name'] ) ) {
153 return;
154 }
155
156 // Set properties based directly on parameters.
157 foreach ( array( 'name', 'value', 'path', 'domain', 'port', 'host_only' ) as $field ) {
158 if ( isset( $data[ $field ] ) ) {
159 $this->$field = $data[ $field ];
160 }
161 }
162
163 if ( isset( $data['expires'] ) ) {
164 $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] );
165 } else {
166 $this->expires = null;
167 }
168 }
169 }
170
171 /**
172 * Confirms that it's OK to send this cookie to the URL checked against.
173 *
174 * Decision is based on RFC 2109/2965, so look there for details on validity.
175 *
176 * @since 2.8.0
177 *
178 * @param string $url URL you intend to send this cookie to
179 * @return bool true if allowed, false otherwise.
180 */
181 public function test( $url ) {
182 if ( is_null( $this->name ) ) {
183 return false;
184 }
185
186 // Expires - if expired then nothing else matters.
187 if ( isset( $this->expires ) && time() > $this->expires ) {
188 return false;
189 }
190
191 // Get details on the URL we're thinking about sending to.
192 $url = parse_url( $url );
193 $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' === $url['scheme'] ? 443 : 80 );
194 $url['path'] = isset( $url['path'] ) ? $url['path'] : '/';
195
196 // Values to use for comparison against the URL.
197 $path = isset( $this->path ) ? $this->path : '/';
198 $port = isset( $this->port ) ? $this->port : null;
199 $domain = isset( $this->domain ) ? strtolower( $this->domain ) : strtolower( $url['host'] );
200 if ( false === stripos( $domain, '.' ) ) {
201 $domain .= '.local';
202 }
203
204 // Host - very basic check that the request URL ends with the domain restriction (minus leading dot).
205 $domain = ( str_starts_with( $domain, '.' ) ) ? substr( $domain, 1 ) : $domain;
206 if ( ! str_ends_with( $url['host'], $domain ) ) {
207 return false;
208 }
209
210 // Port - supports "port-lists" in the format: "80,8000,8080".
211 if ( ! empty( $port ) && ! in_array( $url['port'], array_map( 'intval', explode( ',', $port ) ), true ) ) {
212 return false;
213 }
214
215 // Path - request path must start with path restriction.
216 if ( ! str_starts_with( $url['path'], $path ) ) {
217 return false;
218 }
219
220 return true;
221 }
222
223 /**
224 * Convert cookie name and value back to header string.
225 *
226 * @since 2.8.0
227 *
228 * @return string Header encoded cookie name and value.
229 */
230 public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
231 if ( ! isset( $this->name ) || ! isset( $this->value ) ) {
232 return '';
233 }
234
235 /**
236 * Filters the header-encoded cookie value.
237 *
238 * @since 3.4.0
239 *
240 * @param string $value The cookie value.
241 * @param string $name The cookie name.
242 */
243 return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );
244 }
245
246 /**
247 * Retrieve cookie header for usage in the rest of the WordPress HTTP API.
248 *
249 * @since 2.8.0
250 *
251 * @return string
252 */
253 public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
254 return 'Cookie: ' . $this->getHeaderValue();
255 }
256
257 /**
258 * Retrieves cookie attributes.
259 *
260 * @since 4.6.0
261 *
262 * @return array {
263 * List of attributes.
264 *
265 * @type string|int|null $expires When the cookie expires. Unix timestamp or formatted date.
266 * @type string $path Cookie URL path.
267 * @type string $domain Cookie domain.
268 * }
269 */
270 public function get_attributes() {
271 return array(
272 'expires' => $this->expires,
273 'path' => $this->path,
274 'domain' => $this->domain,
275 );
276 }
277}
278