mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
allow option to make pad names case-insensitive (#5501) by @DanielHabenicht
* New option to make pad names case-insensitive fixes #3844 * fix helper.gotoTimeslider() * fix helper.aNewPad() return value * Update src/node/utils/Settings.js Co-authored-by: Richard Hansen <rhansen@rhansen.org> * remove timeout * rename enforceLowerCasePadIds to lowerCasePadIds * use before and after hooks * update with socket specific test * enforce sanitizing padID for websocket connections - only enforce for newly created pads, to combat case-sensitive pad name hijacking * Added updated package.json file. --------- Co-authored-by: Richard Hansen <rhansen@rhansen.org> Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
This commit is contained in:
parent
22704f7dff
commit
675c0130b9
9 changed files with 950 additions and 858 deletions
|
@ -181,7 +181,9 @@ const helper = {};
|
|||
helper.padOuter$.fx.off = true;
|
||||
helper.padInner$.fx.off = true;
|
||||
|
||||
return opts.id;
|
||||
// Don't return opts.id -- the server might have redirected the browser to a transformed version
|
||||
// of the requested pad ID.
|
||||
return helper.padChrome$.window.clientVars.padId;
|
||||
};
|
||||
|
||||
helper.newAdmin = async (page) => {
|
||||
|
|
|
@ -175,9 +175,8 @@ helper.disableStickyChatviaIcon = async () => {
|
|||
*/
|
||||
helper.gotoTimeslider = async (revision) => {
|
||||
revision = Number.isInteger(revision) ? `#${revision}` : '';
|
||||
const iframe = $('#iframe-container iframe');
|
||||
iframe.attr('src', `${iframe.attr('src')}/timeslider${revision}`);
|
||||
|
||||
helper.padChrome$.window.location.href =
|
||||
`${helper.padChrome$.window.location.pathname}/timeslider${revision}`;
|
||||
await helper.waitForPromise(() => helper.timesliderTimerTime() &&
|
||||
!Number.isNaN(new Date(helper.timesliderTimerTime()).getTime()), 10000);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue