summaryrefslogtreecommitdiff
path: root/lib/web (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-03-26Add support for generic OAuth2 providersPedro Ferreira2-0/+107
Signed-off-by: Pedro Ferreira <pedro.ferreira@cern.ch>
2018-03-25Change config to camel case with backwards compatibilitySheogorath15-43/+43
This refactors the configs a bit to now use camel case everywhere. This change should help to clean up the config interface and make it better understandable. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-20Refactoring imageRouter to modularitySheogorath6-132/+183
This should make the imageRouter more modular and easier to extent. Also a lot of code duplication was removed which should simplify maintenance in future. In the new setup we only need to provide a new module file which exports a function called `uploadImage` and takes a filePath and a callback as argument. The callback itself takes an error and an url as parameter. This eliminates the need of a try-catch-block around the statement and re-enabled the optimization in NodeJS. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-18Add check for undefined UUIDSheogorath1-1/+8
This check is needed at there are tons of LDAP implementations out there and none has at least one guaranteed unique field. As we currently check three fields and added an option to select one yourself, it's still not said that any of these fields is set. This will now create an error and fail the authentication instead of letting people may get access to other people's notes which are stored under a this way deterministic wrong userid named `LDAP-undefined`. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-09Multiple emails from LDAP are already an ArrayFelix Schäfer1-1/+1
Signed-off-by: Felix Schäfer <felix@thegcat.net>
2018-03-01Introduce ldap.useridFieldDustin Frisch1-1/+4
Signed-off-by: Dustin Frisch <fooker@lab.sh>
2018-01-30Fix uncaught exception for non-existent userSheogorath1-0/+5
Since we added user management it's possible to get non-existent users which can cause a crash of the Backend server. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-27Remove camel case from `imageuploadtype` in configSheogorath1-2/+2
This removes the only camel cased option of the config options **we** added to the config.json. In auth provider's config parts are a lot of camel cased options provided. We shouldn't touch them to keep them as similar as possible to the examples. Fixes #315 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-18Allow posting new note with contentDustin Frisch2-0/+11
Signed-off-by: Dustin Frisch <fooker@lab.sh>
2017-12-09Add setting `ldap.usernameField`Lukas Kalbertodt1-1/+7
This determines which ldap field is used as the username on HackMD. By default, the "id" is used as username, too. The id is taken from the fields `uidNumber`, `uid` or `sAMAccountName`. To give the user more flexibility, they can now choose the field used for the username instead.
2017-12-04added guide for SAML settingsNorihito Nakae1-1/+0
2017-11-29fixed the SAML callback URL to unconfigurable.Norihito Nakae1-1/+1
2017-11-28Initial support for SAML authenticationNorihito Nakae2-0/+97
2017-10-31Add mattermost authenticationChristoph Witzany2-0/+50
2017-10-12Fix LDAP problem about missing uidNumberSheogorath1-2/+3
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2017-09-04Give google the correct name.Kaiyu Shi1-3/+3
2017-08-30Add support for minioMarc Deop1-0/+34
2017-06-14fix s3 us-east-1 region endpointKotaro Yamamoto1-1/+4
2017-05-17fix: export to gist occurred 404 not foundMax Wu1-0/+4
2017-05-08Rename checkURiValid.js to checkURIValid.jsMax Wu1-0/+0
2017-05-08fix(imageRouter): import missing dependency: getImageMimeTypeRaccoon Li1-1/+1
2017-05-08refactor(config.js): Extract config fileBoHong Li1-8/+8
* Separate different config source to each files * Freeze config object
2017-05-08refactor: Remove `require` extension filenameBoHong Li1-2/+1
2017-05-08refactor(baseRouter.js): Adjust style fit standardBoHong Li1-1/+0
2017-05-08refactor(auth.js): Remove base pathBoHong Li1-8/+8
2017-05-08refactor(app.js): Move passport serialize and deserialize to auth moduleBoHong Li1-0/+22
2017-05-08refactor(app.js): Extract tooBusyBoHong Li1-0/+13
2017-05-08refactor(app.js): Extract upload imageBoHong Li1-0/+95
2017-05-08refactor(app.js): Extract note actionBoHong Li1-0/+24
2017-05-08refactor(app.js): Extract /me pageBoHong Li1-0/+36
2017-05-08refactor(app.js): Extract history apiBoHong Li1-0/+19
2017-05-08refactor(app.js, auth.js): Extract all auth method to individual modulesBoHong Li10-0/+405
2017-05-08refactor(app.js): Extract status pagesBoHong Li1-0/+92
2017-05-08refactor(app.js): Extract index, 403, 404, 500 pagesBoHong Li1-0/+23
2017-05-08refactor(app.js): Extract urlencodedParser to utils moduleBoHong Li1-0/+9
2017-05-08refactor(app.js): Extract middleware to moduleBoHong Li2-0/+31
extract check URi is valid, redirect without trailing slashes