mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-05 04:06:37 +02:00
feat: Remove paths from plugin packages (#7580)
This commit is contained in:
parent
2a4f51c923
commit
fe6a373bf8
@ -1068,6 +1068,11 @@ const handleClientReady = async (socket:any, message: ClientReadyMessage) => {
|
||||
throw new Error('corrupt pad');
|
||||
}
|
||||
|
||||
let pluginsSanitized: any = plugins.plugins
|
||||
Object.keys(plugins.plugins).forEach(function(element) {
|
||||
const p: any = plugins.plugins[element].package
|
||||
pluginsSanitized[element].package = {name: p.name, version: p.version};
|
||||
});
|
||||
// Warning: never ever send sessionInfo.padId to the client. If the client is read only you
|
||||
// would open a security hole 1 swedish mile wide...
|
||||
const canEditPadSettings = settings.enablePadWideSettings &&
|
||||
@ -1116,7 +1121,7 @@ const handleClientReady = async (socket:any, message: ClientReadyMessage) => {
|
||||
exportAvailable: exportAvailable(),
|
||||
docxExport: settings.docxExport,
|
||||
plugins: {
|
||||
plugins: plugins.plugins,
|
||||
plugins: pluginsSanitized,
|
||||
parts: plugins.parts,
|
||||
},
|
||||
indentationOnNewLine: settings.indentationOnNewLine,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user