summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorpav <pav@df743ca5-7f9a-e211-a948-0013205c9059>2005-09-11 02:33:57 +0800
committerpav <pav@df743ca5-7f9a-e211-a948-0013205c9059>2005-09-11 02:33:57 +0800
commitc71f70fcfbcc0c4ae0daac1bdab666cd5cce9197 (patch)
treef630084bdd3fa6c4d76a33aa3d42f6924e9a857b /www
parentfcec9bc4f56229f70e44d7fd2a62fee602912395 (diff)
downloadmarcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar.gz
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar.bz2
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar.lz
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar.xz
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.tar.zst
marcuscom-ports-c71f70fcfbcc0c4ae0daac1bdab666cd5cce9197.zip
- Patch CAN-2005-2871
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4816 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'www')
-rw-r--r--www/firefox-devel/Makefile4
-rw-r--r--www/firefox-devel/files/patch-CAN-2005-287195
-rw-r--r--www/firefox3-devel/Makefile4
-rw-r--r--www/firefox3-devel/files/patch-CAN-2005-287195
4 files changed, 194 insertions, 4 deletions
diff --git a/www/firefox-devel/Makefile b/www/firefox-devel/Makefile
index 62af80275..b6e5f22db 100644
--- a/www/firefox-devel/Makefile
+++ b/www/firefox-devel/Makefile
@@ -3,12 +3,12 @@
# Whom: Alan Eldridge <alane@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/www/firefox-devel/Makefile,v 1.14 2005/08/20 00:06:18 marcus Exp $
+# $MCom: ports/www/firefox-devel/Makefile,v 1.15 2005/09/10 04:56:53 marcus Exp $
#
PORTNAME= firefox
DISTVERSION= 1.5b1
-PORTREVISION= 0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
diff --git a/www/firefox-devel/files/patch-CAN-2005-2871 b/www/firefox-devel/files/patch-CAN-2005-2871
new file mode 100644
index 000000000..ad32e3738
--- /dev/null
+++ b/www/firefox-devel/files/patch-CAN-2005-2871
@@ -0,0 +1,95 @@
+#
+# https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=307259
+#
+Index: nsStandardURL.cpp
+===================================================================
+RCS file: /cvs/mozilla/netwerk/base/src/nsStandardURL.cpp,v
+retrieving revision 1.82
+diff -p -u -1 -2 -r1.82 nsStandardURL.cpp
+--- netwerk/base/src/nsStandardURL.cpp 20 Jun 2005 05:23:20 -0000 1.82
++++ netwerk/base/src/nsStandardURL.cpp 9 Sep 2005 16:34:42 -0000
+@@ -458,24 +458,25 @@ nsStandardURL::AppendToBuf(char *buf, PR
+ // 4- update url segment positions and lengths
+ nsresult
+ nsStandardURL::BuildNormalizedSpec(const char *spec)
+ {
+ // Assumptions: all member URLSegments must be relative the |spec| argument
+ // passed to this function.
+
+ // buffers for holding escaped url segments (these will remain empty unless
+ // escaping is required).
+ nsCAutoString encUsername;
+ nsCAutoString encPassword;
+ nsCAutoString encHost;
++ PRBool useEncHost;
+ nsCAutoString encDirectory;
+ nsCAutoString encBasename;
+ nsCAutoString encExtension;
+ nsCAutoString encParam;
+ nsCAutoString encQuery;
+ nsCAutoString encRef;
+
+ //
+ // escape each URL segment, if necessary, and calculate approximate normalized
+ // spec length.
+ //
+ PRInt32 approxLen = 3; // includes room for "://"
+@@ -497,25 +498,25 @@ nsStandardURL::BuildNormalizedSpec(const
+ approxLen += encoder.EncodeSegmentCount(spec, mParam, esc_Param, encParam);
+ approxLen += encoder.EncodeSegmentCount(spec, mQuery, esc_Query, encQuery);
+ approxLen += encoder.EncodeSegmentCount(spec, mRef, esc_Ref, encRef);
+ }
+
+ // do not escape the hostname, if IPv6 address literal, mHost will
+ // already point to a [ ] delimited IPv6 address literal.
+ // However, perform Unicode normalization on it, as IDN does.
+ mHostEncoding = eEncoding_ASCII;
+ if (mHost.mLen > 0) {
+ const nsCSubstring& tempHost =
+ Substring(spec + mHost.mPos, spec + mHost.mPos + mHost.mLen);
+- if (NormalizeIDN(tempHost, encHost))
++ if ((useEncHost = NormalizeIDN(tempHost, encHost)))
+ approxLen += encHost.Length();
+ else
+ approxLen += mHost.mLen;
+ }
+
+ //
+ // generate the normalized URL string
+ //
+ mSpec.SetLength(approxLen + 32);
+ char *buf;
+ mSpec.BeginWriting(buf);
+ PRUint32 i = 0;
+@@ -530,25 +531,30 @@ nsStandardURL::BuildNormalizedSpec(const
+ mAuthority.mPos = i;
+
+ // append authority
+ if (mUsername.mLen > 0) {
+ i = AppendSegmentToBuf(buf, i, spec, mUsername, &encUsername);
+ if (mPassword.mLen >= 0) {
+ buf[i++] = ':';
+ i = AppendSegmentToBuf(buf, i, spec, mPassword, &encPassword);
+ }
+ buf[i++] = '@';
+ }
+ if (mHost.mLen > 0) {
+- i = AppendSegmentToBuf(buf, i, spec, mHost, &encHost);
++ if (useEncHost) {
++ mHost.mPos = i;
++ mHost.mLen = encHost.Length();
++ i = AppendToBuf(buf, i, encHost.get(), mHost.mLen);
++ } else
++ i = AppendSegmentToBuf(buf, i, spec, mHost);
+ net_ToLowerCase(buf + mHost.mPos, mHost.mLen);
+ if (mPort != -1 && mPort != mDefaultPort) {
+ nsCAutoString portbuf;
+ portbuf.AppendInt(mPort);
+ buf[i++] = ':';
+ i = AppendToBuf(buf, i, portbuf.get(), portbuf.Length());
+ }
+ }
+
+ // record authority length
+ mAuthority.mLen = i - mAuthority.mPos;
+
diff --git a/www/firefox3-devel/Makefile b/www/firefox3-devel/Makefile
index 62af80275..b6e5f22db 100644
--- a/www/firefox3-devel/Makefile
+++ b/www/firefox3-devel/Makefile
@@ -3,12 +3,12 @@
# Whom: Alan Eldridge <alane@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/www/firefox-devel/Makefile,v 1.14 2005/08/20 00:06:18 marcus Exp $
+# $MCom: ports/www/firefox-devel/Makefile,v 1.15 2005/09/10 04:56:53 marcus Exp $
#
PORTNAME= firefox
DISTVERSION= 1.5b1
-PORTREVISION= 0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
diff --git a/www/firefox3-devel/files/patch-CAN-2005-2871 b/www/firefox3-devel/files/patch-CAN-2005-2871
new file mode 100644
index 000000000..ad32e3738
--- /dev/null
+++ b/www/firefox3-devel/files/patch-CAN-2005-2871
@@ -0,0 +1,95 @@
+#
+# https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=307259
+#
+Index: nsStandardURL.cpp
+===================================================================
+RCS file: /cvs/mozilla/netwerk/base/src/nsStandardURL.cpp,v
+retrieving revision 1.82
+diff -p -u -1 -2 -r1.82 nsStandardURL.cpp
+--- netwerk/base/src/nsStandardURL.cpp 20 Jun 2005 05:23:20 -0000 1.82
++++ netwerk/base/src/nsStandardURL.cpp 9 Sep 2005 16:34:42 -0000
+@@ -458,24 +458,25 @@ nsStandardURL::AppendToBuf(char *buf, PR
+ // 4- update url segment positions and lengths
+ nsresult
+ nsStandardURL::BuildNormalizedSpec(const char *spec)
+ {
+ // Assumptions: all member URLSegments must be relative the |spec| argument
+ // passed to this function.
+
+ // buffers for holding escaped url segments (these will remain empty unless
+ // escaping is required).
+ nsCAutoString encUsername;
+ nsCAutoString encPassword;
+ nsCAutoString encHost;
++ PRBool useEncHost;
+ nsCAutoString encDirectory;
+ nsCAutoString encBasename;
+ nsCAutoString encExtension;
+ nsCAutoString encParam;
+ nsCAutoString encQuery;
+ nsCAutoString encRef;
+
+ //
+ // escape each URL segment, if necessary, and calculate approximate normalized
+ // spec length.
+ //
+ PRInt32 approxLen = 3; // includes room for "://"
+@@ -497,25 +498,25 @@ nsStandardURL::BuildNormalizedSpec(const
+ approxLen += encoder.EncodeSegmentCount(spec, mParam, esc_Param, encParam);
+ approxLen += encoder.EncodeSegmentCount(spec, mQuery, esc_Query, encQuery);
+ approxLen += encoder.EncodeSegmentCount(spec, mRef, esc_Ref, encRef);
+ }
+
+ // do not escape the hostname, if IPv6 address literal, mHost will
+ // already point to a [ ] delimited IPv6 address literal.
+ // However, perform Unicode normalization on it, as IDN does.
+ mHostEncoding = eEncoding_ASCII;
+ if (mHost.mLen > 0) {
+ const nsCSubstring& tempHost =
+ Substring(spec + mHost.mPos, spec + mHost.mPos + mHost.mLen);
+- if (NormalizeIDN(tempHost, encHost))
++ if ((useEncHost = NormalizeIDN(tempHost, encHost)))
+ approxLen += encHost.Length();
+ else
+ approxLen += mHost.mLen;
+ }
+
+ //
+ // generate the normalized URL string
+ //
+ mSpec.SetLength(approxLen + 32);
+ char *buf;
+ mSpec.BeginWriting(buf);
+ PRUint32 i = 0;
+@@ -530,25 +531,30 @@ nsStandardURL::BuildNormalizedSpec(const
+ mAuthority.mPos = i;
+
+ // append authority
+ if (mUsername.mLen > 0) {
+ i = AppendSegmentToBuf(buf, i, spec, mUsername, &encUsername);
+ if (mPassword.mLen >= 0) {
+ buf[i++] = ':';
+ i = AppendSegmentToBuf(buf, i, spec, mPassword, &encPassword);
+ }
+ buf[i++] = '@';
+ }
+ if (mHost.mLen > 0) {
+- i = AppendSegmentToBuf(buf, i, spec, mHost, &encHost);
++ if (useEncHost) {
++ mHost.mPos = i;
++ mHost.mLen = encHost.Length();
++ i = AppendToBuf(buf, i, encHost.get(), mHost.mLen);
++ } else
++ i = AppendSegmentToBuf(buf, i, spec, mHost);
+ net_ToLowerCase(buf + mHost.mPos, mHost.mLen);
+ if (mPort != -1 && mPort != mDefaultPort) {
+ nsCAutoString portbuf;
+ portbuf.AppendInt(mPort);
+ buf[i++] = ':';
+ i = AppendToBuf(buf, i, portbuf.get(), portbuf.Length());
+ }
+ }
+
+ // record authority length
+ mAuthority.mLen = i - mAuthority.mPos;
+