khakers / modmail-viewer

An advanced web frontend for the modmail discord bot with built in Discord OAuth2 authentication, and support for browsing and searching current and historical logs. Directly replaces logviewer.
MIT License
10 stars 4 forks source link

fix(callback): extra / in redirect URL #38

Closed Ushie closed 1 year ago

Ushie commented 1 year ago

Issue

If the user sets a URL that has a slash at the end, like the following:

an extra / will be appended to the link by logviewer, breaking the redirect URL as it then becomes https://logs.ushie.dev//

Solution

Check if the MODMAIL_VIEWER_URL variable ends with a /