Web instances: Add flags to enable unsafe extra features (#438)

This commit is contained in:
Simon Lecoq
2021-08-01 13:58:41 +02:00
committed by GitHub
parent 9e77a1b2c0
commit 3e26d375eb
8 changed files with 30 additions and 21 deletions

View File

@@ -1,8 +1,10 @@
### 📜 Repository licenses
> ⚠️ This is **NOT** legal advice, use at your own risk
>
> 💣 Do **NOT** enable this plugin on public web instances (plugin allows raw commands injection)
> 🔣 On web instances, this plugin is an extra feature and must be enabled globally in `settings.json`
> 💣 Note that this plugin allows raw commands injection and is **NOT** advised to be enabled on them
> This could result in compromised server!
The *licenses* plugin lets you display license informations like permissions, limitations and conditions along with additional metrics about dependencies.

View File

@@ -1,9 +1,9 @@
//Setup
export default async function({login, q, imports, data, graphql, queries, account}, {enabled = false} = {}) {
export default async function({login, q, imports, data, graphql, queries, account}, {enabled = false, extras = false} = {}) {
//Plugin execution
try {
//Check if plugin is enabled and requirements are met
if ((!enabled) || (!q.licenses))
if ((!enabled) || (!extras) || (!q.licenses))
return null
//Load inputs