summaryrefslogtreecommitdiff
path: root/lib/realtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/realtime.js')
-rw-r--r--lib/realtime.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 5ee9f8fd..d8b0b4c5 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -45,10 +45,10 @@ function secure (socket, next) {
var handshakeData = socket.request
if (handshakeData.headers.cookie) {
handshakeData.cookie = cookie.parse(handshakeData.headers.cookie)
- handshakeData.sessionID = cookieParser.signedCookie(handshakeData.cookie[config.sessionname], config.sessionsecret)
+ handshakeData.sessionID = cookieParser.signedCookie(handshakeData.cookie[config.sessionName], config.sessionSecret)
if (handshakeData.sessionID &&
- handshakeData.cookie[config.sessionname] &&
- handshakeData.cookie[config.sessionname] !== handshakeData.sessionID) {
+ handshakeData.cookie[config.sessionName] &&
+ handshakeData.cookie[config.sessionName] !== handshakeData.sessionID) {
if (config.debug) { logger.info('AUTH success cookie: ' + handshakeData.sessionID) }
return next()
} else {
@@ -284,7 +284,7 @@ function extractNoteIdFromSocket (socket) {
return false
}
var hostUrl = url.parse(referer)
- var noteId = config.urlpath ? hostUrl.pathname.slice(config.urlpath.length + 1, hostUrl.pathname.length).split('/')[1] : hostUrl.pathname.split('/')[1]
+ var noteId = config.urlPath ? hostUrl.pathname.slice(config.urlPath.length + 1, hostUrl.pathname.length).split('/')[1] : hostUrl.pathname.split('/')[1]
return noteId
} else {
return false
@@ -330,7 +330,7 @@ function emitRefresh (socket) {
var note = notes[noteId]
var out = {
title: note.title,
- docmaxlength: config.documentmaxlength,
+ docmaxlength: config.documentMaxLength,
owner: note.owner,
ownerprofile: note.ownerprofile,
lastchangeuser: note.lastchangeuser,
@@ -788,7 +788,7 @@ function connection (socket) {
var note = notes[noteId]
// Only owner can change permission
if (note.owner && note.owner === socket.request.user.id) {
- if (permission === 'freely' && !config.allowanonymous && !config.allowanonymousedits) return
+ if (permission === 'freely' && !config.allowAnonymous && !config.allowAnonymousedits) return
note.permission = permission
models.Note.update({
permission: permission