From 1c1365f3be5886ea153b6ba5f421d3df273f61f0 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 31 Jul 2015 21:02:03 +0200 Subject: [PATCH 1/3] Fix: Restored old behavior of making all usernames lowercase --- login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login.go b/login.go index 513e4f4..2124942 100644 --- a/login.go +++ b/login.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" "strconv" + "strings" "github.com/flosch/pongo2" "github.com/gorilla/mux" @@ -13,7 +14,7 @@ import ( func loginHandler(res http.ResponseWriter, r *http.Request, session *sessions.Session, ctx *pongo2.Context) (*string, error) { var ( - username = r.FormValue("username") + username = strings.ToLower(r.FormValue("username")) password = fmt.Sprintf("%x", sha1.Sum([]byte(cfg.PasswordSalt+r.FormValue("password")))) ) From e22d5faeae535a81e8bfdfcb9dda2318764f726f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 31 Jul 2015 21:02:49 +0200 Subject: [PATCH 2/3] Prepared release 1.2.1 --- History.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.md b/History.md index a1e4c5c..083ad15 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +1.2.1 / 2015-07-31 +================== + + * Fix: Restored old behavior of making all usernames lowercase + 1.2.0 / 2015-07-30 ================== From 1b66ad4b8acdf3cbcc2d280ec86d69f49cddbeb8 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 31 Jul 2015 21:11:19 +0200 Subject: [PATCH 3/3] Fixed numbering in README --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index de7379d..2103256 100644 --- a/README.md +++ b/README.md @@ -77,35 +77,35 @@ Example: redis+tcp://auth:mypass@redis.example.com:6379/5?prefix=cloudkeys:: 1. Create a new CloudControl app -``` -# cctrlapp APP_NAME create custom --buildpack https://github.com/heroku/heroku-buildpack-go -``` + ``` + # cctrlapp APP_NAME create custom --buildpack https://github.com/heroku/heroku-buildpack-go + ``` 2. Push the code to your app and deploy it -``` -# cctrlapp APP_NAME/default push -# cctrlapp APP_NAME/default deploy -``` + ``` + # cctrlapp APP_NAME/default push + # cctrlapp APP_NAME/default deploy + ``` 3. Set your configuration variables (see env variables in usage section above) -``` -# cctrlapp app_name/dep_name config.add PARAM1=VALUE1 PARAM2=VALUE2 [...] -``` + ``` + # cctrlapp app_name/dep_name config.add PARAM1=VALUE1 PARAM2=VALUE2 [...] + ``` ### Install on Heroku 1. Create a new Heroku app -``` -# heroku create -b https://github.com/heroku/heroku-buildpack-go -``` + ``` + # heroku create -b https://github.com/heroku/heroku-buildpack-go + ``` 2. Push the code to your app -``` -# git push heroku master -``` + ``` + # git push heroku master + ``` 3. Set your configuration variables in the Heroku apps dashboard (see env variables in usage section above)