HedgeDoc - Ideas grow better together
Find a file
Sheogorath c67214b7d0 Relax cookie restrictions to 'lax' to allow frontend to work
Our frontend requests the `/me` pathname in order to determine whether
it's logged in or not. Due to the fact that the sameSite attribute of
the session cookie was set to `strict` in a previous commit, the session
token was no longer sent along with HTTP calls initiated by JS. This is
due to the RFCs definition of "safe" HTTP calls in RFC7231.

The bug triggers the UI to show up like an unauthenticated user, even
after a successful login. In order to debug it a look into the send
cookies to the `/me` turned out to be very enlightening.

The fix this patch implements is rather simple, it replaces the sameSite
attribute to `lax` which enables the cookies for those requests again.

Some older and mobile clients were unaffected by this due to the lack of
implementations of sameSite policies.

References:
https://tools.ietf.org/html/rfc7231#section-4.2.1
https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-05#section-5.3.7.1
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
e77e7b165a

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2020-07-10 18:40:56 +08:00
bin
docs
locales
public Set all cookies with sameSite: strict 2020-07-10 18:40:56 +08:00
src Relax cookie restrictions to 'lax' to allow frontend to work 2020-07-10 18:40:56 +08:00
.babelrc
.editorconfig
.eslintignore Do not lint migration code 2020-05-24 18:11:47 +02:00
.eslintrc.js
.gitignore
.mailmap
.sequelizerc.example Fix remaining paths after moving everything to src 2020-05-22 14:19:12 +02:00
.travis.yml
app.json
AUTHORS
CHANGELOG.md
CODE_OF_CONDUCT.md
config.json.example
CONTRIBUTING.md
LICENSE
package.json Fully dedicate our soul to yarn 2020-06-18 16:18:37 +08:00
README.md Fix browser logo links 2020-06-26 09:47:38 +02:00
SECURITY.md
tsconfig.json Add @types/codemirror 2020-05-25 23:33:47 +02:00
webpack.common.js
webpack.dev.js
webpack.htmlexport.js
webpack.prod.js
yarn.lock Upgrade LDAP-auth to fix RCE in ldapauth dependency 2020-06-28 02:49:07 +02:00

CodiMD

#CodiMD on matrix.org build status version POEditor Mastodon

CodiMD lets you create real-time collaborative markdown notes. You can test-drive it by visiting our CodiMD demo server.

It is inspired by Hackpad, Etherpad and similar collaborative editors. This project originated with the team at HackMD and now forked into its own organisation. A longer writeup can be read in the history doc.

CodiMD 1.3.2 with its feature demonstration page open

Community and Contributions

We welcome contributions! There's a lot to do: If you would like to report bugs, the issue tracker is the right place. If you can help translating, find us on POEditor. To get started developing, take a look at the docs/dev directory. In any case: come talk to us, we'll be delighted to help you with the first steps.

To stay up to date with our work or get support it's recommended to join our Matrix channel, stop by our community forums or subscribe to the release feed. We also engage in regular community calls (RSS) which you are very welcome to join.

Installation / Upgrading

You can run CodiMD in a number of ways, and we created setup instructions for all of these:

If you do not wish to run your own setup, you can find a commercial offering at https://hackmd.io. This is not the same codebase as this one, but it is a very similar project.

Configuration

Theres two main ways to configure your CodiMD instance: Config file or environment variables. You can choose what works best for you.

CodiMD can integrate with

  • facebook, twitter, github, gitlab, dropbox, google, ldap, saml and oauth2 for login
  • imgur, s3, minio, azure for image/attachment storage (files can also be local!)
  • dropbox for export and import

More info about that can be found in the configuration docs above.

Browser support

To use CodiMD, your browser should match or exceed these versions:

  • Chrome Chrome >= 47, Chrome Chrome for Android >= 47
  • Safari Safari >= 9, iOS Safarai iOS Safari >= 8.4
  • Firefox Firefox >= 44
  • IE IE >= 9, Edge Edge >= 12
  • Opera Opera >= 34, Opera Mini Opera Mini not supported
  • Android Browser Android Browser >= 4.4

Our community has created related tools, we'd like to highlight codimd-cli which lets you use CodiMD from the comfort of your command line.

License

Licensed under AGPLv3. For our list of contributors, see AUTHORS.