Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Sep 13, 2020
1 parent ee5f02f commit 2806ae5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Fixes that sessionMiddleware doesn't work when user do not register session.
Fixes HttpHeaders and adds nil check.
Fixes cookies containing commas fail for asynchttpserver using base64 encode.

## 0.3.4

Expand Down
2 changes: 1 addition & 1 deletion examples/session/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ let
)


var app = newApp(settings = settings, middlewares = @[sessionMiddleware(secretKey = secretKey.SecretKey)])
var app = newApp(settings = settings, middlewares = @[debugRequestMiddleware(), sessionMiddleware(secretKey = secretKey.SecretKey)])
app.addRoute(urls.urlPatterns, "")
app.run()
2 changes: 1 addition & 1 deletion prologue.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.3.4"
version = "0.3.6"
author = "flywind"
description = "Full-Stack Web Framework."
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/prologue/auth/users.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ from ../core/types import SecretKey


type
User* = ref object of RootObj
User* = object of RootObj
username: string
password: SecretKey
email: string
firstName, lastName: string

SuperUser* = ref object of User
SuperUser* = object of User

proc initUser*(username: string, password: SecretKey, email, firstName,
lastName = ""): User =
Expand Down
2 changes: 1 addition & 1 deletion src/prologue/core/constants.nim
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const
PrologueVersion* = "0.3.4" ## The version of Prologue.
PrologueVersion* = "0.3.6" ## The version of Prologue.
ProloguePrefix* = "PROLOGUE_" ## The helper prefix for Prologue.
6 changes: 3 additions & 3 deletions src/prologue/core/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


import strutils, strtabs, parseutils, tables
import strutils, strtabs, parseutils, tables, base64


type
Expand Down Expand Up @@ -151,8 +151,8 @@ proc parseStringTable*(s: string): StringTableRef {.inline.} =

proc loads*(session: Session, s: string) {.inline.} =
## Loads session from strings.
session.data.parseStringTable(s)
session.data.parseStringTable(decode(s))

proc dumps*(session: Session): string {.inline.} =
## Dumps session to strings.
$session
encode($session)

0 comments on commit 2806ae5

Please sign in to comment.