Merge branch 'main' into 5.1-candidate

This commit is contained in:
ansuz 2022-08-23 16:50:33 +05:30
commit 6fba740b0b
6 changed files with 96 additions and 103 deletions

View file

@ -1,45 +0,0 @@
---
name: Bug report
about: Report a bug in the software
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Where did it happen?**
Did the issue occur on CryptPad.fr or an instance hosted by a third-party?
If on another instance, please provide its full URL.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Browser (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. firefox, tor browser, chrome, safari, brave, edge, ???]
- variations [e.g. Firefox nightly, Firefox ESR, Chromium, Ungoogled chrome]
- Version [e.g. 22]
- Extensions installed (UBlock Origin, Passbolt, LibreJS]
- Browser tweaks [e.g. firefox "Enhanced Tracking Protection" strict/custom mode, tor browser "safer" security level, chrome incognito mode]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View file

@ -0,0 +1,60 @@
name: Bug report
description: Report a reproducible bug for CryptPad. (NOT to be used for support questions.)
labels: ["bug"]
body:
- type: checkboxes
attributes:
label: Contribution guidelines
description: Please read the code of conduct before proceeding.
options:
- label: I've read the [code of conduct](https://github.com/xwiki-labs/cryptpad/blob/main/CODE_OF_CONDUCT.md) and wholeheartedly agree
required: true
- type: checkboxes
attributes:
label: I've found a bug and checked that ...
description: Prior to placing the issue, please check following:** *(fill out each checkbox with an `X` once done)*
options:
- label: ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
required: true
- label: ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
required: true
- label: ... I have understood that answers are voluntary and community-driven, and not commercial support.
required: true
- label: ... I have verified that my issue has not been already answered in the past. I've read the [Common issues documentation section](https://docs.cryptpad.fr/en/FAQ.html#common-issues) and I also checked [previous issues](https://github.com/xwiki-labs/cryptpad/issues).
required: true
- type: textarea
attributes:
label: Description
description: Please provide a brief description of the bug in 1-2 sentences. If applicable, add screenshots to help explain your problem. Very useful for bugs in CryptPad UI.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Please describe the steps to reproduce the bug. Screenshots can be added, if helpful.
placeholder: |-
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: System information
description: In this stage we would kindly ask you to attach general system information about your setup.
value: |-
| Question | Answer |
| --- | --- |
| Operating system and version | I_DO_REPLY_HERE |
| Web browser and version| I_DO_REPLY_HERE |
| Extensions installed | I_DO_REPLY_HERE |
| Browser tweaks | I_DO_REPLY_HERE |
| CryptPad version | I_DO_REPLY_HERE |
validations:
required: true

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: CryptPad.fr issue
url: https://cryptpad.fr/support/#new
about: Please use the integrated support form for CryptPad.fr
- name: Report a security vulnerability
url: https://ouvaton.link/pOgHev
about: Please give us appropriate time to verify, respond and fix before disclosure

View file

@ -1,57 +0,0 @@
---
name: Initial instance configuration
about: Difficulty configuring a CryptPad instance
title: CONFIG
labels: configuration
assignees: ''
---
We receive many issues from people that have tried to set up a new CryptPad instance that does not load any of the interactive editors or which mostly works but has particular problems with the sheet editor.
Before you create an issue:
## Confirm that the problem stems from your instance and not from your browser
Not all browsers support CryptPad correctly, and various browser extensions interfere with its intended behaviour.
https://CryptPad.fr is a good reference point that you can use to confirm that your browser can load a correctly configured instance. If you can't load CryptPad.fr then the problem may be with your browser, its configuration, or one of its active extensions.
## See your instance's checkup page
If your instance is able to at least partially load some pages then you should be able to access the diagnostic page `http(s)://<your-domain>/checkup/`. It will perform some automated tests of your instance's configuration and will provide hints indicating:
1. what is incorrect about your configuration
2. what to change in order to correct the problem
## Write down the exact steps you followed to configure your instance
0. Provide the URL of the guide you followed
1. Confirm that your system has the necessary pre-requisites
* Did you fetch the source code with `git` as recommended?
* Have you installed the recommend version of Nodejs (12.14.0) using [NVM](https://github.com/nvm-sh/nvm)?
* Have you installed `bower` using `npm`?
* Have you fetched the latest source code? Run `git branch` and confirm that it returns either `main` or [the latest of our releases](github.com/xwiki-labs/cryptpad/releases/latest).
2. Did you copy `cryptpad/config/config.example.js` to `cryptpad/config/config.js`, read the comments, and edit the fields which are described as being necessary for a production environment?
3. Did you restart the application server (`server.js`) after making configuration changes?
4. Are you running NGINX as a reverse proxy as we recommend?
5. Have you generated an SSL certificate that is valid for both the domains that are required by the sandboxing system?
6. Do the domains in your NGINX conf match those in `cryptpad/config/config.js`?
## Review the steps you took
If the answer to any of the above questions is _No_ then that is the most likely cause of your difficulty.
Identifying the problem on your own reduces the time we spend answering GitHub issues and leaves more time to fix actual bugs and develop new features.
## Create a detailed report
If you believe you've done all of those steps correctly then proceed with creating an issue with the following:
0. A concise description of the problem you're experiencing and why you believe it stems from a bug in the software and not a configuration issue
1. The list of all the steps you wrote down when following our instructions above
2. A link to your instance so we can easily load your `/checkup/` page for ourselves
3. A list of any errors visible in your browser's console on whichever page is not behaving as expected
4. A list of any further steps you've taken to debug the problem on your own
Finally, remove the text of this issue template and leave only the content you've written.

20
.github/ISSUE_TEMPLATE/new_feature.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Feature Request
description: Suggest an idea for CryptPad
labels: ["feature request"]
body:
- type: textarea
attributes:
label: Summary
description: Please describe your idea in a reasonable amount of detail.
validations:
required: true
- type: textarea
attributes:
label: Motivation
description: Please describe how your idea would benefit you and other users.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request.

View file

@ -168,7 +168,14 @@ define([
if (!msg.data || msg.data === '_READY') { return; }
if (!trusted.includes(msg.origin)) { return; }
var data = typeof(msg.data) === "object" ? msg.data : JSON.parse(msg.data);
var data;
// apparently some browser extensions send messages to random targets
// which can trigger parse errors that interrupt normal behaviour
try {
data = typeof(msg.data) === "object" ? msg.data : JSON.parse(msg.data);
} catch (err) {
console.error(err);
}
if (typeof(data.ack) !== "undefined") {
if (acks[data.txid]) { acks[data.txid](!data.ack); }
} else if (typeof(data.q) === 'string') {