Bug: Note share with password protection doesn't work #1290
Replies: 17 comments 6 replies
-
I have the same issue on a different HTTP endpoint (
|
Beta Was this translation helpful? Give feedback.
-
Just checking - has anyone else found this issue? Sharing notes? |
Beta Was this translation helpful? Give feedback.
-
Will have a look. |
Beta Was this translation helpful? Give feedback.
-
@FliegendeWurst , the issue you are having, is it related to sharing notes with password or something else? If it seems unrelated, a complete set of logs would be quite useful. |
Beta Was this translation helpful? Give feedback.
-
I hit the issue with my Android client, when logging in (maybe the previous session cookie was still set?). It seems like a general issue with the way HTTP responses are modified. |
Beta Was this translation helpful? Give feedback.
-
@MarcS1975 , I've just checked and it seems that the issue is not reproducible. I have tested behind a reverse proxy as well, so it might be related your proxy configuration. Are you able to get the password prompt or do you get the error as soon as you try to access it? |
Beta Was this translation helpful? Give feedback.
-
Going by the code at https://github.com/TriliumNext/Notes/blob/v0.91.5/src/routes/error_handlers.ts#L33-L35 (only Trilium code in the stacktrace) the problem seems to be that the error handler is called after the response has already been sent. |
Beta Was this translation helpful? Give feedback.
-
@FliegendeWurst , the only case I know that causes this kind of issue is if there is some kind of exception thrown by another middleware layer. I did notice it when hosting the server on Windows (non-Docker), due to the session handler. But that's why I would need a full log to see if there is something above the error. |
Beta Was this translation helpful? Give feedback.
-
Hi. So when I add the attributes to the note #shareCredentials="user:password". Then I am asked for credentials but get Below is the log output
|
Beta Was this translation helpful? Give feedback.
-
furthermore, when I unprotect the note but share it with user:password label, I get the following error: and the following error log output:
|
Beta Was this translation helpful? Give feedback.
-
@MarcS1975 , would it be possible for you to restart the server and provide the full logs? |
Beta Was this translation helpful? Give feedback.
-
@MarcS1975 , I can reproduce the issue you are having. What hasn't been mentioned initially is the fact that the note you are sharing is protected: If you try to access a protected note, regardless of whether there is a share password, it will result in the note not being displayed: The reasoning for that is that protected notes are encrypted with your login password. Sharing is available to everyone. As such, protected notes cannot be displayed in shares. The only solution here is to unprotect the note and keep I will fix the error that you are having in the logs (which is a bug on our side), but the end result will be the same: you still need to unprotect the note in order to be able to view it in share. |
Beta Was this translation helpful? Give feedback.
-
@MarcS1975 , regarding the I recommend:
Moving to discussions since it's only tangentially related to the TriliumNext app. |
Beta Was this translation helpful? Give feedback.
-
@FliegendeWurst , please don't forget to open a separate issue should you encounter the log with "Cannot set headers". |
Beta Was this translation helpful? Give feedback.
-
Yes, “ERR_HTTP2_PROTOCOL_ERROR” is an error in Webserver configuration. Can you share your Apache and/or Nginx configuration blocks? |
Beta Was this translation helpful? Give feedback.
-
@perfectra1n Hello - I am using Caddy as reverse proxy and this is my config:
I also tried this version:
Trillium works fine but the shared notes still throw the same error.
|
Beta Was this translation helpful? Give feedback.
-
Hmm, there might be something more here. I just created a very similar bug when developing the LLM functionality. It was because of how Express is handling the response. My function was using |
Beta Was this translation helpful? Give feedback.
-
Description
As reported on Trillium Github, the protected share note function with #shareCredentials="user:password" does not work. Sharing the note without password works fine.
Could have to do with the fact that my server is behind a reverse proxy?
TriliumNext Version
0.91.6
What operating system are you using?
Windows
What is your setup?
Local + server sync
Operating System Version
Windows - Server on Docker
Error logs
Error in browser:
Trillium Log output:
Beta Was this translation helpful? Give feedback.
All reactions