- 16 Sep, 2011 1 commit
-
-
Mike Samuel authored
This replaces the errStr & errLine members of context with a single err *Error, and introduces a number of const error codes, one per escape-time failure mode, that can be separately documented. The changes to the error documentation moved from doc.go to error.go are cosmetic. R=r, nigeltao CC=golang-dev https://golang.org/cl/5026041
-
- 15 Sep, 2011 20 commits
-
-
Robert Griesemer authored
On app-engine, we cannot import syscall. The respective constants are already defined elsewhere for the same reason. R=r, dsymonds CC=golang-dev https://golang.org/cl/5036042
-
Robert Griesemer authored
When saving/restoring the fulltext index, the entire respective suffixarray is now saved/restored (as opposed to the indexed data only, and the suffixarray recreated). This saves significant start-up time for large indexes, at the cost of significantly larger index files. R=r CC=golang-dev https://golang.org/cl/5037043
-
Robert Griesemer authored
R=r CC=golang-dev https://golang.org/cl/5040041
-
Brad Fitzpatrick authored
Fixes #2218 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5037041
-
Brad Fitzpatrick authored
Comments from rsc after 4921049 was submitted. R=rsc CC=golang-dev https://golang.org/cl/5034042
-
Brad Fitzpatrick authored
Fixes #2208 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5011051
-
Russ Cox authored
This makes it possible to use a FlagSet as a field in a larger struct. R=golang-dev, r CC=golang-dev https://golang.org/cl/5036041
-
Russ Cox authored
Fixes #1156. Fixes #2172. R=gri CC=golang-dev https://golang.org/cl/5015044
-
Russ Cox authored
The go/build package already recognizes system-specific file names like mycode_darwin.go mycode_darwin_386.go mycode_386.s However, it is also common to write files that apply to multiple architectures, so a recent CL added to go/build the ability to process comments listing a set of conditions for building. For example: // +build darwin freebsd openbsd/386 says that this file should be compiled only on OS X, FreeBSD, or 32-bit x86 OpenBSD systems. These conventions are not yet documented (hence this long CL description). This CL adds build comments to the multi-system files in the core library, a step toward making it possible to use go/build to build them. With this change go/build can handle crypto/rand, exec, net, path/filepath, os/user, and time. os and syscall need additional adjustments. R=golang-dev, r, gri, r, gustavo CC=golang-dev https://golang.org/cl/5011046
-
Russ Cox authored
New rules as discussed on CL 5011046. Also apply to C and assembly files, not just Go files. R=r, rogpeppe CC=golang-dev https://golang.org/cl/5015051
-
Brad Fitzpatrick authored
R=iant, iant CC=golang-dev https://golang.org/cl/5016051
-
Brad Fitzpatrick authored
Fixes #2258 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5016048
-
Russ Cox authored
R=adg TBR=adg CC=golang-dev https://golang.org/cl/5024046
-
Russ Cox authored
R=adg CC=golang-dev https://golang.org/cl/5018044
-
Mike Samuel authored
Not all content is plain text. Sometimes content comes from a trusted source, such as another template invocation, an HTML tag whitelister, etc. Template authors can deal with over-escaping in two ways. 1) They can encapsulate known-safe content via type HTML, type CSS, type URL, and friends in content.go. 2) If they know that the for a particular action never needs escaping then they can add |noescape to the pipeline. {{.KnownSafeContent | noescape}} which will prevent any escaping directives from being added. This CL defines string type aliases: HTML, CSS, JS, URI, ... It then modifies stringify to unpack the content type. Finally it modifies the escaping functions to use the content type and decline to escape content that does not require it. There are minor changes to escapeAction and helpers to treat as equivalent explicit escaping directives such as "html" and "urlquery" and the escaping directives defined in the contextual autoescape module and to recognize the special "noescape" directive. The html escaping functions are rearranged. Instead of having one escaping function used in each {{.}} in {{.}} : <textarea title="{{.}}">{{.}}</textarea> a slightly different escaping function is used for each. When {{.}} binds to a pre-sanitized string of HTML `one < <i>two</i> & two < "3"` we produces something like one < <i>two</i> & two < "3" : <textarea title="one < two & two < "3""> one < <i>two</i> & two < "3" </textarea> Although escaping is not required in <textarea> normally, if the substring </textarea> is injected, then it breaks, so we normalize special characters in RCDATA and do the same to preserve attribute boundaries. We also strip tags since developers never intend typed HTML injected in an attribute to contain tags escaped, but do occasionally confuse pre-escaped HTML with HTML from a tag-whitelister. R=golang-dev, nigeltao CC=golang-dev https://golang.org/cl/4962067
-
Andrew Gerrand authored
R=r CC=golang-dev https://golang.org/cl/5002041
-
Robert Griesemer authored
- now fulltext index information is saved/restored - minor updates to appinit.go R=rsc CC=golang-dev https://golang.org/cl/5024043
-
Robert Griesemer authored
R=rsc CC=golang-dev https://golang.org/cl/5024042
-
Mike Samuel authored
This moots a caveat in the proposed package documentation by rendering useless any template that could not be escaped. From https://golang.org/cl/4969078/ > If EscapeSet returns an error, do not Execute the set; it is not > safe against injection. r: [but isn't the returned set nil? i guess you don't overwrite the r: original if there's a problem, but i think you're in your rights to r: do so] R=r CC=golang-dev https://golang.org/cl/5020043
-
Hector Chu authored
The Windows implementation of the net package churns through a couple of channels for every read/write operation. This translates into a lot of time spent in the kernel creating and deleting event objects. R=rsc, dvyukov, alex.brainman, jp CC=golang-dev https://golang.org/cl/4997044
-
- 14 Sep, 2011 19 commits
-
-
Ian Lance Taylor authored
Lets test pass when using gccgo. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5018046
-
David Symonds authored
R=adg, r, edsrzf, rsc, r CC=golang-dev https://golang.org/cl/4962052
-
Mike Samuel authored
R=nigeltao, r CC=golang-dev https://golang.org/cl/4969078
-
Rob Pike authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5021042
-
Adam Langley authored
It would be nice not to have to support this since all the clients that we care about support TLSv1 by now. However, due to buggy implementations of SSLv3 on the Internet which can't do version negotiation correctly, browsers will sometimes switch to SSLv3. Since there's no good way for a browser tell a network problem from a buggy server, this downgrade can occur even if the server in question is actually working correctly. So we need to support SSLv3 for robustness :( Fixes #1703. R=bradfitz CC=golang-dev https://golang.org/cl/5018045
-
Mike Samuel authored
R=nigeltao CC=golang-dev https://golang.org/cl/5012044
-
Rob Pike authored
R=golang-dev, cw CC=golang-dev https://golang.org/cl/5004045
-
Marcel van Lohuizen authored
R=r, rsc CC=golang-dev https://golang.org/cl/5009045
-
Ian Lance Taylor authored
The spec says that all methods are inherited from an anonymous field. There is no exception for non-exported methods. This is related to issue 1536. R=rsc CC=golang-dev https://golang.org/cl/5012043
-
Robert Griesemer authored
for handling errors Fixes #2249. R=rsc CC=golang-dev https://golang.org/cl/4952071
-
Russ Cox authored
R=gri CC=golang-dev https://golang.org/cl/4978065
-
Russ Cox authored
R=ukai CC=golang-dev https://golang.org/cl/4999043
-
Russ Cox authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/4995045
-
Mikio Hara authored
R=golang-dev CC=golang-dev https://golang.org/cl/5020045
-
Nigel Tao authored
TBR=rsc CC=golang-dev https://golang.org/cl/5016044
-
Nigel Tao authored
taking (w, h int). R=rsc, bsiegert, r CC=golang-dev https://golang.org/cl/4964073
-
Alex Brainman authored
Fixes #2181. R=golang-dev, jp CC=golang-dev https://golang.org/cl/5000042
-
Mike Samuel authored
The template package is the only one that has a doc.go not mentioned in its Makefile. This doesn't seem to bother godoc, but seems like a bug to me. $ for d in $(find pkg -name doc.go); do echo $d; grep doc.go $(dirname $d)/Makefile; done pkg/fmt/doc.go doc.go\ pkg/go/doc/doc.go doc.go\ pkg/gob/doc.go doc.go\ pkg/html/doc.go doc.go\ pkg/old/template/doc.go doc.go\ pkg/sync/atomic/doc.go doc.go\ pkg/template/doc.go R=r CC=golang-dev https://golang.org/cl/5003047
-
Mike Samuel authored
This CL moves code but makes no changes otherwise. R=nigeltao, r CC=golang-dev https://golang.org/cl/5012045
-