Lines Matching refs:key

105 static bool php_mail_build_headers_check_field_name(zend_string *key)  in php_mail_build_headers_check_field_name()  argument
110 while (len < key->len) { in php_mail_build_headers_check_field_name()
111 if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') { in php_mail_build_headers_check_field_name()
120 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val);
122 static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elem() argument
126 if (php_mail_build_headers_check_field_name(key) != SUCCESS) { in php_mail_build_headers_elem()
127 zend_value_error("Header name \"%s\" contains invalid characters", ZSTR_VAL(key)); in php_mail_build_headers_elem()
136 …alue_error("Header \"%s\" contains LF character that is not allowed in the header", ZSTR_VAL(key)); in php_mail_build_headers_elem()
139 …alue_error("Header \"%s\" contains CR character that is not allowed in the header", ZSTR_VAL(key)); in php_mail_build_headers_elem()
142 …LF characters that are used as a line separator and are not allowed in the header", ZSTR_VAL(key)); in php_mail_build_headers_elem()
145 …ue_error("Header \"%s\" contains NULL character that is not allowed in the header", ZSTR_VAL(key)); in php_mail_build_headers_elem()
149 …end_value_error("Header \"%s\" has invalid format, or contains invalid characters", ZSTR_VAL(key)); in php_mail_build_headers_elem()
152 smart_str_append(s, key); in php_mail_build_headers_elem()
158 php_mail_build_headers_elems(s, key, val); in php_mail_build_headers_elem()
161 …zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_v… in php_mail_build_headers_elem()
166 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elems() argument
173 …zend_type_error("Header \"%s\" must only contain numeric keys, \"%s\" found", ZSTR_VAL(key), ZSTR_… in php_mail_build_headers_elems()
178 …zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), … in php_mail_build_headers_elems()
181 php_mail_build_headers_elem(s, key, tmp_val); in php_mail_build_headers_elems()
189 zend_string *key; in php_mail_build_headers() local
193 ZEND_HASH_FOREACH_KEY_VAL(headers, idx, key, val) { in php_mail_build_headers()
194 if (!key) { in php_mail_build_headers()
200 if (zend_string_equals_literal_ci(key, "orig-date")) { in php_mail_build_headers()
201 PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); in php_mail_build_headers()
202 } else if (zend_string_equals_literal_ci(key, "from")) { in php_mail_build_headers()
203 PHP_MAIL_BUILD_HEADER_CHECK("from", s, key, val); in php_mail_build_headers()
204 } else if (zend_string_equals_literal_ci(key, "sender")) { in php_mail_build_headers()
205 PHP_MAIL_BUILD_HEADER_CHECK("sender", s, key, val); in php_mail_build_headers()
206 } else if (zend_string_equals_literal_ci(key, "reply-to")) { in php_mail_build_headers()
207 PHP_MAIL_BUILD_HEADER_CHECK("reply-to", s, key, val); in php_mail_build_headers()
208 } else if (zend_string_equals_literal_ci(key, "to")) { in php_mail_build_headers()
210 } else if (zend_string_equals_literal_ci(key, "cc")) { in php_mail_build_headers()
211 PHP_MAIL_BUILD_HEADER_CHECK("cc", s, key, val); in php_mail_build_headers()
212 } else if (zend_string_equals_literal_ci(key, "bcc")) { in php_mail_build_headers()
213 PHP_MAIL_BUILD_HEADER_CHECK("bcc", s, key, val); in php_mail_build_headers()
214 } else if (zend_string_equals_literal_ci(key, "message-id")) { in php_mail_build_headers()
215 PHP_MAIL_BUILD_HEADER_CHECK("message-id", s, key, val); in php_mail_build_headers()
216 } else if (zend_string_equals_literal_ci(key, "references")) { in php_mail_build_headers()
217 PHP_MAIL_BUILD_HEADER_CHECK("references", s, key, val); in php_mail_build_headers()
218 } else if (zend_string_equals_literal_ci(key, "in-reply-to")) { in php_mail_build_headers()
219 PHP_MAIL_BUILD_HEADER_CHECK("in-reply-to", s, key, val); in php_mail_build_headers()
220 } else if (zend_string_equals_literal_ci(key, "subject")) { in php_mail_build_headers()
223 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()