While there is currently validation of the token to the channel, the specific endpoint used for invitations requires the 'admin' scope for the owner of the token, without such the lack of error error (#2627054: Notice: Undefined index: error in Drupal\slack_invite\Form\SlackInviteForm->submitForm()) will occur.

Will look into a patch this evening.

Members fund testing for the Drupal project. Drupal Association Learn more


Deciphered created an issue. See original summary.

Deciphered’s picture

Status: Active » Needs review
917 bytes
Deciphered’s picture

828 bytes
911 bytes

Fixed issue with original patch.

  • 721183f committed on 8.x-1.x
    Issue #2627060 by Deciphered: Validate token scope - use Exception...
  • Deciphered authored b67ceed on 8.x-1.x
    Issue #2627060 by Deciphered: Validate token scope
BTMash’s picture

Status: Needs review » Fixed

I liked your patch and how you found the admin scope and committed your patch. I made some additional changes on top of it so your setErrorByName() would now throw an exception and getMessage() instead of the hardcoded message.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.