Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord webhook url validation fails #971

Open
xrem opened this issue May 28, 2020 · 4 comments
Open

Discord webhook url validation fails #971

xrem opened this issue May 28, 2020 · 4 comments

Comments

@xrem
Copy link

xrem commented May 28, 2020

Looks like discord have changed domain name they were using:
https://support.discord.com/hc/en-us/articles/360042987951-Discordapp-com-is-now-Discord-com

Validation on UI needs to be fixed:
image

@xrem
Copy link
Author

xrem commented May 28, 2020

Related backend method;

protected function validate_WebHookURL(string $key, string $val, string $type) : bool {
$valid = true;
if( !empty($val) ){
$hosts = [
'slack' => ['hooks.slack.com'],
'discord' => ['discordapp.com', 'ptb.discordapp.com']
];

Related frontend validation regexps:

<input name="discordWebHookURLRally" type="url" class="form-control" id="{{discordWebHookURLRallyId}}" value="{{discordWebHookURLRally}}" placeholder="https://discordapp.com/api/webhooks/XXXYYYZZZ" data-type-error="No valid URL" pattern="^https://(\w+\.)?discordapp.com/.*" data-pattern-error="Wrong domain. https://discordapp.com/)" {{^discordRallyEnabled}}disabled{{/discordRallyEnabled}}>

<input name="slackWebHookURL" type="url" class="form-control" id="{{slackWebHookURLId}}" value="{{slackWebHookURL}}" placeholder="https://hooks.slack.com/services/XXX/YYY/ZZZ" data-type-error="No valid URL" pattern="^https://hooks.slack.com/.*" data-pattern-error="Wrong domain. https://hooks.slack.com/)">

@xrem
Copy link
Author

xrem commented May 28, 2020

Going to fix this later today by myself.

Also, old webhooks with discordapp.com domain is still working, since discordapp.com redirects to discord.com

@cyberea
Copy link

cyberea commented Nov 21, 2020

Hello, @xrem was this fixed? Asking since the issue is still open and there is no reference to the commit. Thank you.

@xrem
Copy link
Author

xrem commented Nov 28, 2020

@cyberea nope.
I've left corporation that was used pathfinder, so there are no more points left for me to support private pathfinder instance on my host.

Also project looks kinda abandoned, so even if i contribute, author eventually won't magically appear here and approve PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants