Compare commits

...

10 Commits

Author SHA1 Message Date
astaxie
c294b087b9 Merge pull request #1183 from Augists/master
garyburd/redigo -> gomodule/redigo
2022-09-10 22:22:24 +08:00
Augists
faa1edc694 redigo moved to gomodule 2022-01-21 09:45:36 +08:00
astaxie
184e305820 Merge pull request #1178 from daffaz/daffaz
Typo 02.3.md
2021-11-28 08:14:58 +08:00
astaxie
ff0913c144 Merge pull request #1179 from 60ke/patch-1
fix link
2021-11-28 08:14:38 +08:00
LookForAdmin
56b2cdaea6 fix link 2021-10-22 18:48:01 +08:00
Daffa Zaky
3d30efde3b Update 02.3.md 2021-10-14 00:48:05 +07:00
astaxie
a7e3921b2d Merge pull request #1176 from titanzerg/master
Update 01.1.md
2021-10-02 10:09:43 +08:00
titanzerg
313d45c4c1 Update 01.1.md
typo
2021-09-25 11:54:13 +07:00
astaxie
02a75fa133 Merge pull request #1175 from 1k-ct/patch-1
fix typo
2021-08-30 12:07:15 +08:00
1k-ct
6ab72e8777 fix typo 2021-08-12 20:17:00 +09:00
6 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# Multiple Language Versions # Multiple Language Versions
* [(HTML - PDF) on GitBook](https://legacy.gitbook.com/book/astaxie/build-web-application-with-golang) * [(HTML - PDF) on GitBook](https://astaxie.gitbooks.io/build-web-application-with-golang)
* [Deutsch](de/preface.md) * [Deutsch](de/preface.md)
* [English](en/preface.md) * [English](en/preface.md)
* [Español](es/preface.md) * [Español](es/preface.md)

View File

@@ -193,7 +193,7 @@ Use the `func` keyword to define a function.
func funcName(input1 type1, input2 type2) (output1 type1, output2 type2) { func funcName(input1 type1, input2 type2) (output1 type1, output2 type2) {
// function body // function body
// multi-value return // multi-value return
return value1, value2 return output1, output2
} }
``` ```
We can extrapolate the following information from the example above. We can extrapolate the following information from the example above.

View File

@@ -9,7 +9,7 @@ As the C language of the 21st century, Go has good support for NoSQL databases,
redis is a key-value storage system like Memcached, that supports the string, list, set, zset(ordered set) and hash value types. redis is a key-value storage system like Memcached, that supports the string, list, set, zset(ordered set) and hash value types.
There are some Go database drivers for redis: There are some Go database drivers for redis:
- [https://github.com/garyburd/redigo](https://github.com/garyburd/redigo) - [https://github.com/gomodule/redigo](https://github.com/gomodule/redigo)
- [https://github.com/go-redis/redis](https://github.com/go-redis/redis) - [https://github.com/go-redis/redis](https://github.com/go-redis/redis)
- [https://github.com/hoisie/redis](https://github.com/hoisie/redis) - [https://github.com/hoisie/redis](https://github.com/hoisie/redis)
- [https://github.com/alphazero/Go-Redis](https://github.com/alphazero/Go-Redis) - [https://github.com/alphazero/Go-Redis](https://github.com/alphazero/Go-Redis)
@@ -22,7 +22,7 @@ Let's see how to use the driver that redigo to operate on a database:
import ( import (
"fmt" "fmt"
"github.com/garyburd/redigo/redis" "github.com/gomodule/redigo/redis"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"

View File

@@ -1,5 +1,5 @@
# 9.3 XSS攻撃の回避 # 9.3 XSS攻撃の回避
インターネット技術の発展に伴って、現在のWebアプリケーションはどれも大量の動的なコンテンツを含ませることでユーザビリティを高めています。いわゆる動的なコンテンツとは、アプリケーション・プログラムがユーザの環境とユーザのリクエストに従って対応するコンテンツを出力することをいいます。動的なホームページは"クロスサイトスクリプティング攻撃Cross Site Scripting, セキュリティ専門家は通常これを省略してXSSと呼びます"の脅威を受ける可能性があります。的なホームページは完全にこの影響を受けません。 インターネット技術の発展に伴って、現在のWebアプリケーションはどれも大量の動的なコンテンツを含ませることでユーザビリティを高めています。いわゆる動的なコンテンツとは、アプリケーション・プログラムがユーザの環境とユーザのリクエストに従って対応するコンテンツを出力することをいいます。動的なホームページは"クロスサイトスクリプティング攻撃Cross Site Scripting, セキュリティ専門家は通常これを省略してXSSと呼びます"の脅威を受ける可能性があります。的なホームページは完全にこの影響を受けません。
## XSSとは何か ## XSSとは何か
XSS攻撃クロスサイトスクリプティング(Cross-Site Scripting)。カスケーディングスタイルシート(Cascading Style Sheets, CSS)の省略と混同しないようにクロスサイトスクリプティングはXSSと省略されます。XSSはよく見かけるセキュリティホールの一種です。これは攻撃者が悪意のあるコードを他のユーザが使用しているページに埋め込むことを許してしまいます。多くの攻撃(一般には攻撃者と被害者のみに影響します)とは異なりXSSは第三者に及びます。すなわち、攻撃者、クライアントとWebアプリケーションです。XSSの攻撃目標はクライアントに保存されたcookieの奪取またはクライアントの身分を識別する慎重に扱うべき情報を使う他のページです。一旦合法的なユーザの情報が取得されると、攻撃者は合法的なユーザを装ってページに対してやりとりを行うことができるようになります。 XSS攻撃クロスサイトスクリプティング(Cross-Site Scripting)。カスケーディングスタイルシート(Cascading Style Sheets, CSS)の省略と混同しないようにクロスサイトスクリプティングはXSSと省略されます。XSSはよく見かけるセキュリティホールの一種です。これは攻撃者が悪意のあるコードを他のユーザが使用しているページに埋め込むことを許してしまいます。多くの攻撃(一般には攻撃者と被害者のみに影響します)とは異なりXSSは第三者に及びます。すなわち、攻撃者、クライアントとWebアプリケーションです。XSSの攻撃目標はクライアントに保存されたcookieの奪取またはクライアントの身分を識別する慎重に扱うべき情報を使う他のページです。一旦合法的なユーザの情報が取得されると、攻撃者は合法的なユーザを装ってページに対してやりとりを行うことができるようになります。

View File

@@ -39,7 +39,7 @@ sudo apt-get install gcc libc6-dev
บน Windows สามารถทำสิ่งเดียวกันนี้โดยใช้คำสั่ง `all.bat` แทน บน Windows สามารถทำสิ่งเดียวกันนี้โดยใช้คำสั่ง `all.bat` แทน
หากใช้ระบบปฎิบัติการ Windows ตัวติดตั้งจะทำการตั้งค่าตัวแปร environment ให้โดยอัตโนมัติ แต่่่หากเป็นระบบที่คล้าย Unix นั้น เราต้องตั้งค่าเหล่านั้นด้วยตัวเอง ดังนี้ ( ***หากเป็น Go เวอร์ชั่นที่มากกว่า 1.0 เราไม่จำเป็นต้องตั้งค่า $GOBIN โดยจะถูกตั้งค่าให้อย่างอัตโนมัติโดยอ้างอิงจาก $GOROOT/bin ซึ่งจะได้พูดถึงในบทถัดไป*** ) หากใช้ระบบปฎิบัติการ Windows ตัวติดตั้งจะทำการตั้งค่าตัวแปร environment ให้โดยอัตโนมัติ แต่หากเป็นระบบที่คล้าย Unix นั้น เราต้องตั้งค่าเหล่านั้นด้วยตัวเอง ดังนี้ ( ***หากเป็น Go เวอร์ชั่นที่มากกว่า 1.0 เราไม่จำเป็นต้องตั้งค่า $GOBIN โดยจะถูกตั้งค่าให้อย่างอัตโนมัติโดยอ้างอิงจาก $GOROOT/bin ซึ่งจะได้พูดถึงในบทถัดไป*** )
export GOROOT=$HOME/go export GOROOT=$HOME/go
export GOBIN=$GOROOT/bin export GOBIN=$GOROOT/bin

View File

@@ -9,7 +9,7 @@ redis是一个key-value存储系统。和Memcached类似它支持存储的val
目前应用redis最广泛的应该是新浪微博平台其次还有Facebook收购的图片社交网站instagram。以及其他一些有名的[互联网企业](http://redis.io/topics/whos-using-redis) 目前应用redis最广泛的应该是新浪微博平台其次还有Facebook收购的图片社交网站instagram。以及其他一些有名的[互联网企业](http://redis.io/topics/whos-using-redis)
Go目前支持redis的驱动有如下 Go目前支持redis的驱动有如下
- https://github.com/garyburd/redigo (推荐) - https://github.com/gomodule/redigo (推荐)
- https://github.com/go-redis/redis - https://github.com/go-redis/redis
- https://github.com/hoisie/redis - https://github.com/hoisie/redis
- https://github.com/alphazero/Go-Redis - https://github.com/alphazero/Go-Redis
@@ -27,7 +27,7 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/garyburd/redigo/redis" "github.com/gomodule/redigo/redis"
) )
var ( var (