Commit graph

337 commits

Author SHA1 Message Date
muxator
01497aa399 SecurityManager: clarify the role of the token parameter (and cookie)
"token" is a random token representing the author, of the form
t.randomstring_of_lenght_20. The random string is generated by the client. The
cookie is used for every pad in the web UI, and is not used for HTTP API.

This comes from the discussion at https://github.com/ether/etherpad-lite/issues/3563
2020-04-24 02:55:20 +02:00
Chocobozzz
963d12e614 PadManager: use a set instead of an array in padlist
Avoid looping on the array, especially useful if you have many pads.

--HG--
branch : padlist-use-set
2020-04-09 03:39:32 +02:00
Chocobozzz
94ff21e25c PadManager: anchor the addPad regex to the start of the string
This improves the performance a bit, and is more adherent to the logic of the
application.

--HG--
branch : padlist-use-set
2020-04-09 03:39:32 +02:00
Marcin Cieślak
df08883a00 SecurityManager: remove double quotes from session cookie content
Sometimes, RFC 6265-compliant [0] web servers may send back a cookie whose value
is enclosed in double quotes, such as:

    Set-Cookie: sessionCookie="s.37cf5299fbf981e14121fba3a588c02b,s.2b21517bf50729d8130ab85736a11346"; Version=1; Path=/; Domain=localhost; Discard

Where the double quotes at the start and the end of the header value are just
delimiters. This is perfectly legal: Etherpad parsing logic should cope with
that, and remove the quotes early in the request phase.

Somehow, this does not happen, and in such cases the actual value that
sessionCookie ends up having is:

    sessionCookie = '"s.37cf5299fbf981e14121fba3a588c02b,s.2b21517bf50729d8130ab85736a11346"'

As quick measure, let's strip the double quotes (when present).
Note that here we are being minimal, limiting ourselves to just removing quotes
at the start and the end of the string.

Fixes #3819.
Also, see #3820.


[0] https://tools.ietf.org/html/rfc6265
2020-04-09 01:14:51 +02:00
muxator
4ef59bbda0 api: in getStats(), directly rewrote activePads as an expression
Instead of creating an empty Set and then mutate it.
2020-04-04 22:03:46 +02:00
Chocobozzz
82b919fc65 api: add getStats() function 2020-04-04 22:03:46 +02:00
John McLear
53f126082a SessionStore: replace password with PASSWORD_HIDDEN when storing in db
Fixes #3421.
2020-04-01 03:39:05 +02:00
muxator
39f271bfed DB.js: remove else clause, since we are already exiting early
No functional changes.
2020-03-24 23:26:19 +01:00
muxator
3b24c97d1e db/SecurityManager.js: accessing without session a public group pad no longer causes a crash
Steps to reproduce (via HTTP API):
1. create a group via createGroup()
2. create a group pad inside that group via createGroupPad()
3. make that pad public calling setPublicStatus(true)
4. access the pad via a clean web browser (with no sessions)
5. UnhandledPromiseRejectionWarning: apierror: sessionID does not exist

This was due to an overlook in 769933786c: "apierror: sessionID does not
exist" may be a legal condition if we are also visiting a public pad. The
function that could throw that error was sessionManager.getSessionInfo(), and
thus it needed to be inside the try...catch block.

Please note that calling getText() on the pad always return the pad contents,
*even for non-public pads*, because the API bypasses the security checks and
directly talks to the DB layer.

Fixes #3600.
2019-12-26 00:30:43 +01:00
muxator
312c72c364 formatting: bulk remove trailing whitespaces
Do not touch vendorized files (e.g. libraries that were imported from external
projects).

No functional changes.

Command:
    find . -name '*.<EXTENSION>' -type f -print0 | xargs -0 sed -i 's/[[:space:]]*$//'
2019-10-20 02:09:22 +02:00
muxator
b2d00ae071 db/API.js: customeError -> customError
Found by the Typescript compiler when doing an experimental conversion.
2019-03-27 18:29:12 +01:00
muxator
aa5e302d99 db/API.js: missing "let"
Found by the Typescript compiler when doing an experimental conversion.
2019-03-27 18:29:12 +01:00
muxator
b9e537ca4f db/Pad.js: removed unreachable return statement
Found by the Typescript compiler when doing an experimental conversion.
2019-03-27 18:29:12 +01:00
muxator
4040813447 db/Pad.js: prototype.copy(), removed redundant callback argument
This would cause a crash when calling pad.remove().
Found by the Typescript compiler when doing an experimental conversion.
2019-03-27 18:29:12 +01:00
Ray Bellis
ac7663c337 db/DB.js: prevent DB layer from returning undefined
ueberDB2 can return either undefined or null for a missing key, depending on
which DB driver is used. This patch changes the promise version of the API so
that it will always return null.
2019-03-05 10:46:57 +00:00
Ray Bellis
769933786c allow some operations to proceed in parallel
some code chunks previously used `async.parallel` but if you
use `await` that forces them to be run serially.  Instead,
you can initiate the operation (getting a Promise) and then
_later_ `await` the result of that Promise.
2019-02-01 09:57:50 +00:00
Ray Bellis
e7c2fad7b0 convert some async loops into parallel loops
If you use `await` inside a loop it makes the loop inherently serial.

If you omit the `await` however, the tasks will all start but the loop
will finish while the tasks are still being scheduled.

So, to make a set of tasks run in parallel but then have the
code block after the loop once all the tasks have been completed
you have to get an array of Promises (one for each iteration) and
then use `Promise.all()` to wait for those promises to be resolved.
Using `Array#map` is a convenient way to go from an array of inputs
to the require array of Promises.
2019-02-01 00:07:06 +00:00
Ray Bellis
b1c5024bcf remove thenify use - no longer required 2019-01-31 14:48:22 +00:00
Ray Bellis
6d1b6b2796 db/Pad.js: convert to promises/async
Also updated some small chunks of dependent code that couldn't be converted
until this one had been done.
2019-01-31 11:14:38 +00:00
Ray Bellis
62345ac8f7 import/export: conversion to Promises/async
NB1: needs additional review and testing - no abiword available on my test bed
NB2: in ImportHandler.js, directly delete the file, and handle the eventual
     error later: checking before for existence is prone to race conditions,
     and does not handle any errors anyway.
2019-01-31 08:55:36 +00:00
Ray Bellis
5192a0c498 db/ReadOnlyManager.js: completed conversion
Requires temporary hack within `Pad.remove()` to allow for the lack of
callback on the rewritten version.
2019-01-30 16:19:51 +00:00
Ray Bellis
982d4f380a db/Pad.js: start use of promise DB methods 2019-01-30 10:25:46 +00:00
Ray Bellis
bbe4a5f756 db/PadManager.js: more conversion to Promises/async 2019-01-28 16:20:30 +00:00
Ray Bellis
8108964472 db/AuthorManager.js: further conversion
also fixes a missing await calling `.createAuthor` in db/Pad.js
2019-01-28 15:36:36 +00:00
Ray Bellis
005c0afa97 db/SessionManager.js: completely converted to Promises/async 2019-01-28 14:44:36 +00:00
Ray Bellis
e58da69cfb db/SecurityManager.js: converted checkAccess() to pure Promises
Also converted the handler functions that depend on checkAccess() into async
functions too.

NB: this commit needs specific attention to it because it touches a lot of
security related code!
2019-01-28 13:13:24 +00:00
Ray Bellis
e7dc0766fd db/API.js: complete conversion to Promises
This patch also contains significant refactoring relating to error checking of
arguments supplied to the functions (e.g. rev) facilitated by use of `throw`
instead of nodeback errors.
2019-01-25 18:08:34 +00:00
Ray Bellis
8f53e4407e db/AuthorManager.js: partial conversion to Promises 2019-01-25 15:47:25 +00:00
Ray Bellis
eedae98e2f db/PadManager.js: convert sanitizePadId() to Promises
The function is now iterative rather than recursive.
2019-01-25 15:15:16 +00:00
Ray Bellis
bf9e3f92b5 db/PadManager.js: renamed doesPadExists() -> doesPadExist()
Removed the 's' for consistency with the other `doesFooExist()` manager calls.
Retained an alias for plugins that might be using it.
2019-01-25 15:05:12 +00:00
Ray Bellis
a875ca6c30 db/SessionManager.js: mostly converted to Promises 2019-01-25 14:53:24 +00:00
Ray Bellis
16c4c33f49 db/AuthorManager.js: renamed doesAuthorExists() -> doesAuthorExist()
Removed the 's' for consistency with the other `doesFooExist()` manager calls.
Retained an alias for plugins that might be using it.
2019-01-25 13:37:24 +00:00
Ray Bellis
70a045ad3c db/GroupManager.js: mostly converted to Promises / async 2019-01-25 12:56:57 +00:00
Ray Bellis
29e9f86cad db/DB.js: add Promise-only API methods
Promisified methods:
  - get()
  - set()
  - findKeys()
  - getSub()
  - setSub()
  - remove()
  - doShutdown()
2019-01-23 18:08:47 +00:00
Ray Bellis
583ea92aaf db/SessionStore.js: do not migrate to Promises. Make optional all(), clear() and length()
1. This module was not migrated to Promises, because it is only used via
   express-session, which can't actually use promises anyway.

2. all(), clear() and length() depend on the presence of the `db.forEach()`
   function, which in ueberdb2 doesn't even exist.

   Fortunately those three methods are optional, so I made their existence
   conditional on the presence of `db.forEach`.

3. in SessionStore.clear(), replaced a call to db.db.remove() with db.remove()
2019-01-23 16:58:43 +00:00
muxator
630af9af7d db/SessionStore.js: call nextTick() only if there is something to do
Changed two occurrences of:

  process.nextTick(function() {
     if (fn) fn();
  });

with

  if (fn) {
    process.nextTick(fn);
  }

i.e. such that no function even gets added to the `nextTick` queue unless
there's actually a function to be called.

Extracted from Ray's work.
2019-02-09 00:14:53 +01:00
Ray Bellis
34fdaa4e8c db/SecurityManager.js: convert checkAccess() to thenify 2019-01-23 16:25:29 +00:00
Ray Bellis
17fe32ec0c start using "thenify" to support callback and promises
PadManager.sanitizePadId() can't use thenify: single arg callback
2019-01-21 16:28:05 +00:00
muxator
40c45077ef db/GroupManager.js: factored out a variable
Extracted from Ray's work.
2019-02-09 01:15:50 +01:00
Ray Bellis
3802073695 db/DB.js: allow a Promise return instead of callbacks in init() 2019-01-18 13:48:46 +00:00
muxator
b0846ded14 db/SessionManager.js: "authorMangager" -> "authorManager"
Extracted from Ray's work.
2019-02-09 02:19:14 +01:00
muxator
98993fe156 db/SessionManager.js: "groupMangager" -> "groupManager"
Extracted from Ray's work.
2019-02-09 02:18:36 +01:00
muxator
11453d544c prepare to async: stricter checks
This change is in preparation of the future async refactoring by Ray. It tries
to extract as many changes in boolean conditions as possible, in order to make
more evident identifying eventual logic bugs in the future work.

This proved already useful in at least one case.

BEWARE: this commit exposes an incoherency in the DB API, in which, depending
on the driver used, some functions can return null or undefined. This condition
will be externally fixed by the final commit in this series ("db/DB.js: prevent
DB layer from returning undefined"). Until that commit, the code base may have
some bugs.
2019-03-01 09:43:41 +01:00
muxator
e841798314 prepare to async: typos in error messages
This change extracts the grammar correction performed on the async branch,
anticipating them in a single commit. It cannot be folded with the previous
one, as it is not purely cosmetic.
2019-02-15 22:52:53 +01:00
muxator
9497ee734f prepare to async: trivial reformatting
This change is only cosmetic. Its aim is do make it easier to understand the
async changes that are going to be merged later on. It was extracted from the
original work from Ray Bellis.

To verify that nothing has changed, you can run the following command on each
file touched by this commit:
  npm install uglify-es
  diff --unified <(uglify-js --beautify bracketize <BEFORE.js>) <(uglify-js --beautify bracketize <AFTER.js>)



This is a complete script that does the same automatically (works from a
mercurial clone):

```bash
#!/usr/bin/env bash

set -eu

REVISION=<THIS_REVISION>

PARENT_REV=$(hg identify --rev "${REVISION}" --template '{p1rev}')
FILE_LIST=$(hg status --no-status --change ${REVISION})
UGLIFYJS="node_modules/uglify-es/bin/uglifyjs"

for FILE_NAME in ${FILE_LIST[@]}; do
  echo "Checking ${FILE_NAME}"
  diff --unified \
    <("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${PARENT_REV}" "${FILE_NAME}")) \
    <("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${REVISION}"   "${FILE_NAME}"))
done
```
2019-02-08 23:20:57 +01:00
muxator
cc23bd18a4 db/API.js: require() Changeset library at top of file
Introduced with d246a191c6 ("Added option to restore revisions #1791") on
2014-11-08.
2019-03-07 00:39:41 +01:00
muxator
06756e49ee db/API.js: reuse the already required padMessageHandler (2 of 2)
It was introduced on 2014-11-12 by commit 9d39c9591a ("update pad clients").
2019-03-07 00:14:49 +01:00
muxator
72260b86de db/API.js: reuse the already required padMessageHandler (1 of 2)
Commit 94cb743ca8 ("Fix API call appendChatMessage to send new message to all
connected clients") fixed a bug, but introduced a redundant require().
2019-03-07 00:04:08 +01:00
muxator
10172af199 db/API.js: no need to parseInt(time) here
We are already sure that time is an int
2019-03-07 00:02:24 +01:00
muxator
b34fc2de2b use Date.now() instead of new Date().getTime()
This is documented to be more performant.

The substitution was made on frontend code, too (i.e., the one in /static),
because Date.now() is supported since IE 9, and we are life supporting only
IE 11.

Commands:
  find . -name *.js | xargs sed --in-place "s/new Date().getTime()/Date.now()/g"
  find . -name *.js | xargs sed --in-place "s/(new Date()).getTime()/Date.now()/g"

Not done on jQuery.
2019-02-26 23:25:15 +01:00
muxator
169a06793d db/API.js: almost removed optional argument handling
The HTTP API doesn't ever omit arguments, it always passes `undefined` for a
parameter that wasn't supplied in the request.

The functions that were simplified are:
  - getRevisionChangeset()
  - getText()
  - getHTML()
  - saveRevision()

The only function still supporting optional arguments is getPadSafe(), which is
only called from this module.
2019-02-19 00:15:54 +01:00
muxator
26f3f1bcd0 db/Pad.js: make "force" parameter non optional in Pad.prototype.copy()
This function was simulating two overloads:
  1. copy(destinationID, force, callback)
  2. copy(destinationID, callback), in this case "force" would be assumed false

But all the call sites always used the version with arity 3.
Thus, we can remove that optionality and always assume that the funcion will be
called with three parameters. This will simplify future work.
2019-02-13 14:01:24 +01:00
muxator
1a93ab4eb5 db/Pad: reversed truthy condition to make core logic evident
Since the original comparison compared for truthy and not for "===", and it's
3 AM now, I blindly negated it, in order to show how fragile it was in the first
instance.

No functional changes.

This is the final commit of this refactoring series.
2018-08-29 03:03:34 +02:00
muxator
69e1bf28aa db/Pad: reversed condition to make core logic evident. No functional changes
Here it was legal to replace a lax comparison with a strict one, since we are
using indexOf(), whose return value is known.
2018-08-29 02:52:26 +02:00
muxator
d931a700b4 db/Pad: reversed condition to make error handling evident. No functional changes
Here it was legal to replace a lax comparison with a strict one, since we are
using indexOf(), whose return value is known.
2018-08-29 02:49:40 +02:00
muxator
0e8789863c db/Pad: removed unuseful else clause, no functional changes 2018-08-29 02:46:08 +02:00
muxator
049f5f2859 db/Pad: removed unuseful else clause, no functional changes 2018-08-29 02:44:51 +02:00
muxator
e90487c3e2 db/GroupManager: early return, no functional changes 2018-08-29 02:42:29 +02:00
muxator
a1d21c0cd2 db/GroupManager: early return, no functional changes 2018-08-29 02:41:53 +02:00
muxator
9ed7608421 db/GroupManager: early return, no functional changes 2018-08-29 02:41:14 +02:00
muxator
da8faa1aa9 db/GroupManager: early return, no functional changes 2018-08-29 02:40:14 +02:00
muxator
f7254a47ea db/GroupManager: early return, no functional changes 2018-08-29 02:39:05 +02:00
muxator
604952bc97 db/GroupManager: fix indentation
This is to make easier on the eye the next change.
2018-08-29 02:38:09 +02:00
muxator
c85bcf0614 db/GroupManager: move inner function on top. No functional change
This is to make easier on the eye the next change.
2018-08-29 02:36:25 +02:00
muxator
6af419a88e SecurityManager.js: early return, no functional changes 2018-08-29 02:33:29 +02:00
muxator
61823e7689 db/AuthorManager: early return, no functional changes 2018-08-29 02:28:40 +02:00
muxator
2b8646a855 db/AuthorManager: early return, no functional changes 2018-08-29 02:28:35 +02:00
muxator
b59818676e db/API.js: early return to make error handling evident. No functional changes 2018-08-29 02:18:32 +02:00
muxator
67ce19eddb db/API.js: removed unuseful else clause, no functional changes 2018-08-29 02:16:24 +02:00
muxator
610a6db8c8 db/API.js: early return, no functional changes 2018-08-29 02:13:06 +02:00
muxator
fef57efd46 db/API.js: early return, no functional changes 2018-08-29 02:10:45 +02:00
muxator
42bc0a59e1 db/API.js: early return, no functional changes 2018-08-29 02:09:33 +02:00
muxator
05a33f1533 db/API.js, SessionManager: lot of copied & pasted code in integer parsing
Replaced with an early return, no functional changes.
2018-08-29 02:08:05 +02:00
muxator
1d45a63864 db/API.js: early return, no functional changes 2018-08-29 01:57:00 +02:00
muxator
30d814d8ed db/API.js: early return, no functional changes 2018-08-29 01:57:28 +02:00
muxator
4728736dd8 db/PadManager: early return, no functional changes 2018-08-29 01:47:38 +02:00
muxator
ecb0c41d29 db/PadManager: early return, no functional changes 2018-08-29 01:46:18 +02:00
muxator
12f224ae72 db/PadManager: early return, no functional changes 2018-08-29 01:44:13 +02:00
muxator
27b3b0ecd2 logs: on the server, use template literals when possible
It's just synctactic sugar, but it is always better than executing string
concatenations in one's mind.

Do not do this with files in src/static, because we want to keep IE 11
compatibility.
2018-08-27 01:29:37 +02:00
John McLear
f15c7d7186
Merge pull request #3280 from lmagniez/ImprovedReadibility
Improved readibility
2018-04-03 17:22:08 +01:00
John McLear
2765a95774
Merge pull request #3218 from klausweiss/develop
Feature: New server-side hook: onAccessCheck
2018-04-03 13:38:47 +01:00
Luiza Pagliari
187e51948d
[fix] Don't show "pad deleted" message when copying pad (#3320)
Fix #3183
2018-02-16 14:18:51 -02:00
Loick Magniez
54e834194b Changed the color palette and changed the pad's font size to 16px 2017-11-22 16:04:17 +01:00
Mikołaj Biel
2508b9749c fix typo 2017-07-10 20:59:08 +02:00
Mikołaj Biel
35702a0589 [feat] New server-side hook: onAccessCheck 2017-07-10 20:54:32 +02:00
Luiza Pagliari
fc89034a55 [feat] New server-side hook: padCopy
Let plugins know when a pad is copied.
2017-05-18 18:52:14 -03:00
John McLear
d545630912 fixes #2945 2016-05-28 22:25:44 +01:00
John McLear
638757fdb5 Update DB.js 2016-01-06 00:01:48 +00:00
Francois Cassin
2bd698343a Protects against a null atext in cloneAText 2015-11-10 16:21:43 +01:00
Bradley Arvin
a9d7ab9e18 Fix for #2809 2015-10-28 13:28:54 -04:00
Ted Mielczarek
a675659dc2 Add an appendText API 2015-10-19 15:27:09 -04:00
Andreas Fried
e6b0e954b5 Fix off-by-one: The chatHead is in fact a valid message index.
This fixes #2751.
2015-09-30 00:48:15 +02:00
Stefan
cc9f88e7ed Merge pull request #2757 from Gared/doc_append_chat_message
Add appendChatMessage API to docs
2015-08-30 18:15:51 +02:00
Stefan
f27aacc5bf Fix missing bracket 2015-08-15 22:41:59 +02:00
Stefan
94cb743ca8 Fix API call appendChatMessage to send new message to all connected clients 2015-08-15 22:05:31 +02:00
Xavid
ad137fa4c8 Restore newline-adding to setText() if passed string does not end in '\n'.
Add a test for the ending-in-'\n' case and update tests for the other case.
2015-06-30 04:47:55 -04:00
Xavid
a4fe0d0dc8 Add an 'author' entry to the context for the padCreate and padUpdate hooks. 2015-06-21 11:29:17 -04:00
Xavid
5e64c292a4 When using setText(), replace the entire existing text of the pad,
rather than replacing all except the last letter.
2015-05-05 14:18:27 -04:00
John McLear
5ef22e649b Merge pull request #2302 from Gared/create_pad_special_characters
Add check for special url characters to createPad API function
2015-04-11 14:56:26 +01:00
Stefan
aa0d14c7d7 Merge branch 'master' of git://github.com/ether/etherpad-lite into create_pad_special_characters 2015-04-11 12:10:37 +02:00
Tom Hunkapiller
d0b39c01fb update for express 4.x 2015-04-08 23:12:11 -05:00
John McLear
32a09ff461 tests and fix up sloppy code by original author 2015-04-01 13:52:56 +01:00
John McLear
c705a058fb Merge branch 'feature/append-chat-api' of github.com:derosm2/etherpad-lite into append-chat-api 2015-04-01 13:32:07 +01:00
Luc Didry
92022e493e Add backend tests for new API functions
These new functions are:
* getSavedRevisionsCount
* listSavedRevisions
* saveRevision

+ typo fixing in backend tests
2015-02-25 01:05:58 +01:00
Luc Didry
845788c39d Add a saveRevision API function
Calling saveRevision create an author which name is "API"
2015-02-25 01:04:27 +01:00
Luc Didry
a08c50a77d Fixes #1870
Add two functions to API :
 * getSavedRevisionsCount
 * listSavedRevisions
2015-02-24 23:42:35 +01:00
Mike DeRosa
4c6bd37286 Adding api call for appending a chat message. 2015-02-09 00:18:12 -05:00
John McLear
4f637befeb more fixing 2015-01-19 02:59:17 +00:00
John McLear
cadb83ac5a bumpage 2015-01-19 02:51:32 +00:00
John McLear
302ceb665b delay write to fix copypad -- bad practice but due to db.set not allowing callback 2014-12-29 14:59:22 +01:00
John McLear
c4959b089f resolve merge conflict 2014-12-29 01:54:44 +01:00
webzwo0i
69bad8b30c fix typo in addSavedRevisions 2014-12-17 01:10:20 +01:00
webzwo0i
b204aa2085 remove more dead requires. 2014-12-16 19:10:01 +01:00
John McLear
cfa3f15f94 Merge pull request #2373 from webzwo0i/avoid-global-vairables
dont make local variables global
2014-12-16 00:41:41 +00:00
webzwo0i
5d15f655f0 dont make local variables global 2014-12-14 22:01:28 +01:00
John McLear
865829e159 Merge pull request #1682 from luto/fix-listSessionsOfGroup
Don't error in listSessionsOfGroup when there are non-existing sessions
2014-11-15 16:25:23 +00:00
Cristo
f7dd756642 Update API.js 2014-11-12 19:53:56 +01:00
Cristo
f59238fe58 Update API.js 2014-11-12 19:50:43 +01:00
Cristo
24ac082cae Update API.js 2014-11-12 19:49:08 +01:00
Cristo
9d39c9591a update pad clients 2014-11-12 19:46:50 +01:00
Stefan
573a912e4f Add check for special url characters to createPad API function 2014-11-08 17:26:40 +01:00
Cristo
c33c6e085e comment addded 2014-11-08 01:39:27 +01:00
Cristo
d246a191c6 Added option to restore revisions #1791 2014-11-08 01:12:40 +01:00
Marcel Klehr
9d1eca42b3 Merge pull request #2174 from ether/fix/copy-pad-update-lists
Fix #2136: update cache and group list when copying pads
2014-07-08 19:07:35 +00:00
Marcel Klehr
3cafd689af Fix Pad#copy routine for updating group list 2014-07-07 21:14:00 +02:00
Marcel Klehr
b1b972a2b4 Merge pull request #1787 from goldquest/dev_nopass_whensession
Grant access for valid session to password protected group pads

so, if user has valid session, they don't need the password
2014-06-17 14:01:16 +02:00
Marcel Klehr
c4f9828825 Fix #2136: update cache and group list when copying pads 2014-06-11 22:23:43 +02:00
Stephan Jauernick
412bdd1857 Renamed the variable to prevent possible problems. 2014-06-01 21:19:15 +02:00
Stephan Jauernick
d42a9eb3a6 Enhanced the Example for the API Method getPadID and make the return value consistent to other functions 2014-05-31 11:53:44 +02:00
Stephan Jauernick
fffdde0c59 Implemented the the new API method getPadID for reversing the Readonly ID. Based on: ff88c19fc1 2014-05-31 00:43:31 +02:00
John McLear
44b1ac2b16 Merge pull request #1984 from ldidry/fix/getRevisionChangeset-crash
Fix getRevisionChangeset API call making etherpad crash
2014-05-14 14:10:44 +01:00
goldquest
a00c505403 Sometimes, the author2session / group2session don't exist anymore, but the session does.
It should be possible to delete a session, if they don't exist
2014-03-14 17:50:37 +01:00
Robert Helmer
348d9a838f convert over to server-side crypto 2014-01-15 11:44:57 -08:00
Marcel Klehr
adf05576b2 Don't crash if CHANGESET_REQ fails 2013-12-17 16:20:57 +01:00
Lennart Brinkmann
dd8af99e2e Add input validation for html param in setHTML() 2013-12-14 21:14:56 +01:00
John McLear
58bbfd8a65 resolve merge conflict 2013-12-09 21:55:04 +00:00
Luc Didry
3d8452b143 Replace tabs indentation with spaces indentation
Some files are obviously external libraries, I didn't touch them
2013-12-05 08:41:29 +01:00
s1341
52a99eb9e5 fix bugs, add force option to overwrite destination 2013-11-18 08:25:46 +02:00
s1341
93fcab0461 change parameter names 2013-11-17 21:01:02 +02:00
s1341
29d8bb7716 add pad copy/move API functions 2013-11-17 17:02:44 +00:00
Luc Didry
4a9602cc57 Fix getRevisionChangeset API call making etherpad crash 2013-11-07 22:49:20 +01:00
Marcel Klehr
8ab2442cc9 Update padList correctly
fixes #1971
2013-11-01 14:16:26 +01:00
Marcel Klehr
22b0bafafd Pad list cache: You can't change the cache if it's not initiated
(as per 200f250717 - doh.)
2013-10-14 18:20:24 +02:00
Marcel Klehr
200f250717 You don't need the padList if you want to alter it
Don't query the db for caching a list of pads if you only want to alter the list
2013-10-13 21:20:19 +02:00
John McLear
680d9a2811 Don't try to populate padlist on each req
This is an important fix, prolly wants merging into master ASAP.  

Before this fix each new pad request would re-populate the all pads object, this is a blocking procedure and slows down the loading to a point where it's almost useless :(

Testing didn't find this because our testing stack isn't populated with pad data :|  TLDR.  Our tests still suck, hard.
2013-10-13 16:39:45 +01:00
Marcel Klehr
048d55a64c Don't create new pad if a non-existant read-only pad is accessed
fixes #1848
2013-10-12 18:41:48 +02:00
John McLear
2992e3ea2b clean up 2013-10-09 16:34:50 +01:00
John McLear
40a65bd41c more warns 2013-10-09 16:17:36 +01:00
John McLear
c93acdfc87 suggestion 2013-10-09 16:14:16 +01:00
John McLear
37586d646e Merge pull request #1920 from ether/allow-err-msg-from-listpadsof-author
allow author manager to use custom error module
2013-10-03 06:46:17 -07:00