r89300 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89299‎ | r89300 | r89301 >
Date:22:35, 1 June 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Add some doc comments on Cookie::validateCookieDomain() and Http::isValidUri(), which both have some failing test cases and are incomplete
Modified paths:
  • /trunk/phase3/includes/Cookie.php (modified) (history)
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -125,6 +125,9 @@
126126 * protocols, because we only want protocols that both cURL
127127 * and php support.
128128 *
 129+ * @fixme this is wildly inaccurate and fails to actually check most stuff
 130+ * @fixme do we actually intend to have FTP support here? Does it work consistently?
 131+ *
129132 * @param $uri Mixed: URI to check for validity
130133 * @returns Boolean
131134 */
Index: trunk/phase3/includes/Cookie.php
@@ -62,6 +62,9 @@
6363 * A better method might be to use a blacklist like
6464 * http://publicsuffix.org/
6565 *
 66+ * @fixme fails to detect 3-letter top-level domains
 67+ * @fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases)
 68+ *
6669 * @param $domain String: the domain to validate
6770 * @param $originDomain String: (optional) the domain the cookie originates from
6871 * @return Boolean

Comments

#Comment by Hashar (talk | contribs)   16:54, 5 June 2011

Maybe you could reference the test names and or bug numbers?

#Comment by Brion VIBBER (talk | contribs)   18:39, 6 June 2011

Just run the Http test cases, you'll see them!

#Comment by Hashar (talk | contribs)   18:43, 6 June 2011

Great!

Status & tagging log