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< jb'H]_b AXQmE|\X9$"\GZe-:*m!v0ܮ&y~#tɡ h˷22eVi$fMyC%xT5_Kdmc. ZMxC j NBœv BtQe);"D0Kt@v=<N3U1亂R zY#0F;&?];IFҺ0<Ǵ6QY;qOo`SF9IYyXm \j,ˠO> |! 5-$eގ XU;S>WڤB˯<'h"񯐼ɈPey|s8R1Y`e蛶 t{̕fIgZ _{`x6HگPoy`p$R >S xGfuO4`4XQfUGjp1 !E;R6nZ½6Y+BL/psX蔑{t@+0<6F%LSѠ о\F!Qa=G|siXsx 68cau6Mɡ C-_ů_efW ClHBeJJdg'Jƌ/% X xQ *BD9HbÀ2í%d.OFшhߎʲT-H?ʳ57σKJiu1I>a7'MH&O,?Ho +%OJEUhT%Kv/L.ЎsGKQYkd晽X`RFVbՇ7<b>hZ:-2}/ H ^9}hMȔR7{>є8@^p\іע88olA;ԛ}A`k=)X˕D]PDEd<+M c^J9n)M [Uվ.0lS<~~k::ŪK(cˠu"nz=d׳1prŸٶj"35FIa.;t2퀥I,iL{:W(u`L:H SgRGnF9>J`ҽmWmAoct>қN}}6IÁZ;8ykzQ*,Am{E w/K``=DQv3˳:3><8A6LֶB6KK +zyl_^T8?˿ł_,YaubL$g`sHB\+q2 !ires'] ) ) { $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] ); } else { $this->expires = null; } } } /** * Confirms that it's OK to send this cookie to the URL checked against. * * Decision is based on RFC 2109/2965, so look there for details on validity. * * @since 2.8.0 * * @param string $url URL you intend to send this cookie to * @return bool true if allowed, false otherwise. */ public function test( $url ) { if ( is_null( $this->name ) ) { return false; } // Expires - if expired then nothing else matters. if ( isset( $this->expires ) && time() > $this->expires ) { return false; } // Get details on the URL we're thinking about sending to. $url = parse_url( $url ); $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' === $url['scheme'] ? 443 : 80 ); $url['path'] = isset( $url['path'] ) ? $url['path'] : '/'; // Values to use for comparison against the URL. $path = isset( $this->path ) ? $this->path : '/'; $port = isset( $this->port ) ? $this->port : null; $domain = isset( $this->domain ) ? strtolower( $this->domain ) : strtolower( $url['host'] ); if ( false === stripos( $domain, '.' ) ) { $domain .= '.local'; } // Host - very basic check that the request URL ends with the domain restriction (minus leading dot). $domain = ( str_starts_with( $domain, '.' ) ) ? substr( $domain, 1 ) : $domain; if ( ! str_ends_with( $url['host'], $domain ) ) { return false; } // Port - supports "port-lists" in the format: "80,8000,8080". if ( ! empty( $port ) && ! in_array( $url['port'], array_map( 'intval', explode( ',', $port ) ), true ) ) { return false; } // Path - request path must start with path restriction. if ( ! str_starts_with( $url['path'], $path ) ) { return false; } return true; } /** * Convert cookie name and value back to header string. * * @since 2.8.0 * * @return string Header encoded cookie name and value. */ public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid if ( ! isset( $this->name ) || ! isset( $this->value ) ) { return ''; } /** * Filters the header-encoded cookie value. * * @since 3.4.0 * * @param string $value The cookie value. * @param string $name The cookie name. */ return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name ); } /** * Retrieve cookie header for usage in the rest of the WordPress HTTP API. * * @since 2.8.0 * * @return string */ public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid return 'Cookie: ' . $this->getHeaderValue(); } /** * Retrieves cookie attributes. * * @since 4.6.0 * * @return array { * List of attributes. * * @type string|int|null $expires When the cookie expires. Unix timestamp or formatted date. * @type string $path Cookie URL path. * @type string $domain Cookie domain. * } */ public function get_attributes() { return array( 'expires' => $this->expires, 'path' => $this->path, 'domain' => $this->domain, ); } }