-
Notifications
You must be signed in to change notification settings - Fork 22
Trust the default cell #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
In general it would be good to get your thoughts on jupyterlab/jupyterlab#14347 but I have a suspicion that this is JupyterLab-side issue and "Trust Notebook" implementation will need to be adjusted to work well with RTC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @krassowski.
Should we do the same here?
No, not in general as jupyter_ydoc/jupyter_ydoc/ynotebook.py Lines 263 to 264 in 74f4693
and that may contain an outputs which may need sanitising. |
Yes, not in general but maybe after checking that the cell has no output? |
I would lean towards "still no", because if it comes from an untrusted notebook (with a code cell with outputs that is not trusted) if we mark other code cells with no outputs we would be changing notebook's metadata in flight inducing an unnecessary noise and signature change later on. But it's not a hard no. |
Sounds good, thanks for the explanation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @krassowski
|
@meeseeksdev please backport to 0.2.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Thank you for the backport and release! |
Empty cells should be trusted by default. This accompanies a larger work in JupyterLab (jupyterlab/jupyterlab#14345) aimed at preserving trust behaviour of classing notebook (jupyterlab/jupyterlab#14025).
Addresses one point in jupyterlab/jupyterlab#14347.
An alternative (as discussed in the linked PR) is to always add
trusted: true
metadata to code cells which do not have any outputs (which could be implemented insharedModel.insertCell
) with the pros/cons:Given that security implications I am proposing the more conservative approach of doing it manually each time for now, but I think we could as well automate this in the future (with a big disclaimer in extension upgrade guide).