<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hedgedoc/lib/web/imageRouter, branch cindy</title>
<subtitle>Hedgedoc with support for CindyScript
</subtitle>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/'/>
<entry>
<title>ImageRouterImgur: Replace imgur library with note-fetch request</title>
<updated>2021-04-22T19:23:27+00:00</updated>
<author>
<name>Philip Molares</name>
</author>
<published>2021-04-19T10:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=f34d927e8cec45cf65ccee3197b46f4482b2b273'/>
<id>f34d927e8cec45cf65ccee3197b46f4482b2b273</id>
<content type='text'>
This kinda is a backport of https://github.com/hedgedoc/hedgedoc/pull/961

Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This kinda is a backport of https://github.com/hedgedoc/hedgedoc/pull/961

Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ImageUpload: Fix errors with .jpeg and .svg</title>
<updated>2021-03-29T20:38:42+00:00</updated>
<author>
<name>Philip Molares</name>
</author>
<published>2021-03-28T20:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=5dbe99b4c7b8e136ebc6f05b6b618f044bfd4358'/>
<id>5dbe99b4c7b8e136ebc6f05b6b618f044bfd4358</id>
<content type='text'>
This checks all files that claim to be an svg (by their extension) that they really are and defines the typeFromMagic accordingly
Files that got identified as jpg, but have the extension .jpeg get their extension fixed.
The files extensions will work in all cases now.

Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This checks all files that claim to be an svg (by their extension) that they really are and defines the typeFromMagic accordingly
Files that got identified as jpg, but have the extension .jpeg get their extension fixed.
The files extensions will work in all cases now.

Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Linter: Fix all lint errors</title>
<updated>2021-02-15T11:15:14+00:00</updated>
<author>
<name>Philip Molares</name>
</author>
<published>2021-02-15T08:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=136d895d155f28c2e75b3af206549acaa2a354ed'/>
<id>136d895d155f28c2e75b3af206549acaa2a354ed</id>
<content type='text'>
Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Philip Molares &lt;philip.molares@udo.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch to minio v7 API</title>
<updated>2021-02-12T22:11:37+00:00</updated>
<author>
<name>David Mehren</name>
</author>
<published>2021-02-12T22:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=252141560f8ffcf88f18347f2161b5f3c78ffe12'/>
<id>252141560f8ffcf88f18347f2161b5f3c78ffe12</id>
<content type='text'>
The secure parameter is now called useSSL
https://github.com/minio/minio-js/releases/tag/7.0.0

Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The secure parameter is now called useSSL
https://github.com/minio/minio-js/releases/tag/7.0.0

Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Always save uploads to a tmpdir first and cleanup afterwards</title>
<updated>2020-12-27T18:51:14+00:00</updated>
<author>
<name>David Mehren</name>
</author>
<published>2020-12-27T14:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=6932cc4df7e0c2826e47b2d9ca2f0031f75b1b58'/>
<id>6932cc4df7e0c2826e47b2d9ca2f0031f75b1b58</id>
<content type='text'>
This makes sure no unintended files are permanently saved.

Co-authored-by: Yannick Bungers &lt;git@innay.de&gt;
Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure no unintended files are permanently saved.

Co-authored-by: Yannick Bungers &lt;git@innay.de&gt;
Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve MIME-type checks of uploaded files</title>
<updated>2020-12-27T18:51:12+00:00</updated>
<author>
<name>David Mehren</name>
</author>
<published>2020-12-27T10:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=cf4344d9e031d2e0bf70b8d8f75ab27ecf8d29ad'/>
<id>cf4344d9e031d2e0bf70b8d8f75ab27ecf8d29ad</id>
<content type='text'>
This commit adds a check if the MIME-type of the uploaded file (detected using the magic bytes) matches the file extension.

Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a check if the MIME-type of the uploaded file (detected using the magic bytes) matches the file extension.

Signed-off-by: David Mehren &lt;git@herrmehren.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework error messages for image uploads</title>
<updated>2020-12-27T18:51:02+00:00</updated>
<author>
<name>Sheogorath</name>
</author>
<published>2020-11-23T12:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=f83e4d66ed2b6a7f7f8939e2eb63d262387e9374'/>
<id>f83e4d66ed2b6a7f7f8939e2eb63d262387e9374</id>
<content type='text'>
This patch reworks the error messages for image uploads to make more
sense.

Instead of using the current `formidable error` for everything, all
custom error detection now provide the (hopefully) more useful `Image
Upload error` prefix for error messages.

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch reworks the error messages for image uploads to make more
sense.

Instead of using the current `formidable error` for everything, all
custom error detection now provide the (hopefully) more useful `Image
Upload error` prefix for error messages.

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unauthenticated file uploads</title>
<updated>2020-12-27T18:51:01+00:00</updated>
<author>
<name>Sheogorath</name>
</author>
<published>2020-11-23T11:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=d097211c545118ac13626e1b0a01390b08880ad7'/>
<id>d097211c545118ac13626e1b0a01390b08880ad7</id>
<content type='text'>
This patch fixes the issue of unauthenticated users, being able to
upload files, even when anonymous edits are disabled.

It's implemented by blocking uploads when either `allowAnonymous` is set
to `false` for all unauthenticated users, unless `allowAnonymousEdits`
is set to true, to make sure anonymous editors still experience the full
feature set.

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the issue of unauthenticated users, being able to
upload files, even when anonymous edits are disabled.

It's implemented by blocking uploads when either `allowAnonymous` is set
to `false` for all unauthenticated users, unless `allowAnonymousEdits`
is set to true, to make sure anonymous editors still experience the full
feature set.

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix arbitary file upload for uploadimage API endpoint</title>
<updated>2020-12-27T18:51:01+00:00</updated>
<author>
<name>Sheogorath</name>
</author>
<published>2020-11-23T11:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=dc29a286e665555cccb92760908e50cd967fd2e7'/>
<id>dc29a286e665555cccb92760908e50cd967fd2e7</id>
<content type='text'>
This patch fixes a security issue with all existing CodiMD and HedgeDoc
installation which allows arbitary file uploads to instances that expose
the `/uploadimage` API endpoint. With the patch it implies the same
restrictions on the MIME-types as the frontend does. Means only images
are allowed unless configured differently.

This issue was reported by Thomas Lambertz.

To verify if you are vulnerable or not, create two files `test.html` and
`test.png` and try to upload them to your hedgedoc installation.

```
curl -X POST -F "image=@$(pwd)/test.html" http://localhost:3000/uploadimage
curl -X POST -F "image=@$(pwd)/test.png" http://localhost:3000/uploadimage
```

Note: Not all backends are affected. Imgur and lutim should prevent this
by their own upload API. But S3, minio, filesystem and azure, will be at
risk.

Addition Note: When using filesystem instead of an external uploads
providers, there is a higher risk of code injections as the default CSP
do not block JS from the main domain.

References:
https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-wcr3-xhv7-8gxc

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a security issue with all existing CodiMD and HedgeDoc
installation which allows arbitary file uploads to instances that expose
the `/uploadimage` API endpoint. With the patch it implies the same
restrictions on the MIME-types as the frontend does. Means only images
are allowed unless configured differently.

This issue was reported by Thomas Lambertz.

To verify if you are vulnerable or not, create two files `test.html` and
`test.png` and try to upload them to your hedgedoc installation.

```
curl -X POST -F "image=@$(pwd)/test.html" http://localhost:3000/uploadimage
curl -X POST -F "image=@$(pwd)/test.png" http://localhost:3000/uploadimage
```

Note: Not all backends are affected. Imgur and lutim should prevent this
by their own upload API. But S3, minio, filesystem and azure, will be at
risk.

Addition Note: When using filesystem instead of an external uploads
providers, there is a higher risk of code injections as the default CSP
do not block JS from the main domain.

References:
https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-wcr3-xhv7-8gxc

Signed-off-by: Christoph Kern &lt;sheogorath@shivering-isles.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #213 from davidmehren/refactor_backend_notes</title>
<updated>2019-11-20T19:07:35+00:00</updated>
<author>
<name>Sheogorath</name>
</author>
<published>2019-11-20T19:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://stuebinm.eu/git/hedgedoc/commit/?id=689f5a0a9583fdd774a271a9e6265ee5356d72a0'/>
<id>689f5a0a9583fdd774a271a9e6265ee5356d72a0</id>
<content type='text'>
First steps in refactoring the backend code</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First steps in refactoring the backend code</pre>
</div>
</content>
</entry>
</feed>
