summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/config/default.js3
-rw-r--r--lib/response.js10
-rw-r--r--package.json2
-rw-r--r--public/docs/features.md2
-rw-r--r--public/docs/release-notes.md49
-rw-r--r--public/views/index/body.ejs4
6 files changed, 64 insertions, 6 deletions
diff --git a/lib/config/default.js b/lib/config/default.js
index 6096bce4..c34279bd 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -104,7 +104,8 @@ module.exports = {
baseURL: undefined,
clientID: undefined,
clientSecret: undefined,
- scope: undefined
+ scope: undefined,
+ version: 'v4'
},
mattermost: {
baseURL: undefined,
diff --git a/lib/response.js b/lib/response.js
index 295f91d6..4df036b7 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -32,6 +32,9 @@ var response = {
errorBadRequest: function (res) {
responseError(res, '400', 'Bad Request', 'something not right.')
},
+ errorTooLong: function (res) {
+ responseError(res, '413', 'Payload Too Large', 'Shorten your note!')
+ },
errorInternalError: function (res) {
responseError(res, '500', 'Internal Error', 'wtf.')
},
@@ -145,7 +148,12 @@ function responseCodiMD (res, note) {
function newNote (req, res, next) {
var owner = null
- var body = req.body ? req.body : ''
+ var body = ''
+ if (req.body && req.body.length > config.documentMaxLength) {
+ return response.errorTooLong(res)
+ } else if (req.body) {
+ body = req.body
+ }
body = body.replace(/[\r]/g, '')
if (req.isAuthenticated()) {
owner = req.user.id
diff --git a/package.json b/package.json
index b257a114..903a74ad 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "CodiMD",
- "version": "1.2.0",
+ "version": "1.2.1",
"description": "Realtime collaborative markdown notes on all platforms.",
"main": "app.js",
"license": "AGPL-3.0",
diff --git a/public/docs/features.md b/public/docs/features.md
index f684ca62..1915f0ef 100644
--- a/public/docs/features.md
+++ b/public/docs/features.md
@@ -195,7 +195,7 @@ When you’re a carpenter making a beautiful chest of drawers, you’re not goin
## Externals
### YouTube
-{%youtube 1G4isv_Fylg %}
+{%youtube aqz-KE-bpKQ %}
### Vimeo
{%vimeo 124148255 %}
diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md
index 66202009..c775b70a 100644
--- a/public/docs/release-notes.md
+++ b/public/docs/release-notes.md
@@ -1,6 +1,55 @@
Release Notes
===
+<i class="fa fa-tag"></i> 1.2.1 <i class="fa fa-clock-o"></i> 2018-09-26 00:00
+---
+
+### Enhancements
+* Update Italian translations
+* Update Japanese translations
+* Update markdown-pdf
+* Add support for unix sockets
+* Update "follow us" information to Community channel and translation
+* Add Cloudron installation method
+* Add guide for Mattermost authentication
+* Update various packages
+* Add Indonesian language as new translation
+
+### Fixes
+* Fix content types in status router
+* Fix some modal colors in night mode
+* Fix CSP to allow usage of speaker notes
+* Fix some wrong title attributes in the editor toolbar
+* Fix some confusion about the default location of images. It's always the local filesystem now
+* Fix object handling in avatar generation code
+* Finally fix error handling of LZ-String by using self-maintained version
+* Fix migration handling
+* Fix gitlab API version
+* Fix some server crashes caused by PDF creation
+* Fix document length limit on post to `/new`
+* Fix broken youtube embedding on `/features` page
+
+### Refactors
+* Refactor generation of table of contents
+* Refactor "copyright"-section to be a "Powered by"
+
+### Removes
+* Remove unneeded inline styling
+
+### Deprecations
+* NodeJS version 6
+* Mattermost login integration (is replaced by [generic oAuth2 module](https://github.com/hackmdio/codimd/blob/6ce7b20a7f92ccff2f7f870ff5d116d685310cfd/docs/guides/auth/mattermost-self-hosted.md))
+
+### Honorable mentions
+* [Alex Hesse (Pingu501)](https://github.com/Pingu501)
+* [Alexander Wellbrock (w4tsn)](https://github.com/w4tsn)
+* [Cédric Couralet (micedre)](https://github.com/micedre)
+* [Girish Ramakrishnan (gramakri)](https://github.com/gramakri)
+* [maahl](https://github.com/maahl)
+* [Max Wu (jackycute)](https://github.com/jackycute)
+* [Miranda (ahihi)](https://github.com/ahihi)
+* [Ondřej Slabý (maxer456)](https://github.com/maxer456)
+
<i class="fa fa-tag"></i> 1.2.0 <i class="fa fa-clock-o"></i> 2018-06-28 00:00
---
diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs
index 5b5f7ed3..0f2813b9 100644
--- a/public/views/index/body.ejs
+++ b/public/views/index/body.ejs
@@ -150,10 +150,10 @@
<option value="id">Bahasa Indonesia</option>
</select>
<p>
- &copy; 2018 <a href="https://hackmd.io">CodiMD</a> | <a href="<%- url %>/s/release-notes" target="_blank"><%= __('Releases') %></a><% if(privacyStatement) { %> | <a href="<%- url %>/s/privacy" target="_blank"><%= __('Privacy') %></a><% } %><% if(termsOfUse) { %> | <a href="<%- url %>/s/terms-of-use" target="_blank"><%= __('Terms of Use') %></a><% } %>
+ Powered by <a href="https://codimd.org">CodiMD</a> | <a href="<%- url %>/s/release-notes" target="_blank"><%= __('Releases') %></a><% if(privacyStatement) { %> | <a href="<%- url %>/s/privacy" target="_blank"><%= __('Privacy') %></a><% } %><% if(termsOfUse) { %> | <a href="<%- url %>/s/terms-of-use" target="_blank"><%= __('Terms of Use') %></a><% } %>
</p>
<h6 class="social-foot">
- <%- __('Follow us on %s and %s.', '<a href="https://github.com/hackmdio/CodiMD" target="_blank"><i class="fa fa-github"></i> GitHub</a>, <a href="https://riot.im/app/#/room/#codimd:matrix.org" target="_blank"><i class="fa fa-comments"></i> Riot</a>') %>
+ <%- __('Follow us on %s and %s.', '<a href="https://github.com/hackmdio/CodiMD" target="_blank"><i class="fa fa-github"></i> GitHub</a>, <a href="https://riot.im/app/#/room/#codimd:matrix.org" target="_blank"><i class="fa fa-comments"></i> Riot</a>', '<a href="https://translate.codimd.org" target="_blank"><i class="fa fa-globe"></i> POEditor</a>') %>
</h6>
</div>
</div>