Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Funny Entry Crashes Remind #175

Closed
blark012 opened this issue Feb 11, 2020 · 4 comments
Closed

Funny Entry Crashes Remind #175

blark012 opened this issue Feb 11, 2020 · 4 comments
Assignees
Labels
Type/Bug Something isn't working

Comments

@blark012
Copy link

Summary

entering /remind me asdasd every today causes the plugin to crash

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to any channel
  2. Post /remind me asdasd every today
  3. See error

Expected behavior

a user was trying to spam a co-worker and unintentionally crashed the plugin

Observed behavior (that appears unintentional)

What did you see happen? Please include relevant error messages and/or screenshots.

Server configuration

Operating system:

Mattermost version:
5.17.0
Remind version:
0.4.4
Updated from an older Remind bot version or fresh install:

Mattermost server logs
Insert your Mattermost server logs here

Additional context

Add any other context about the problem here.

@Chubik
Copy link
Contributor

Chubik commented Apr 27, 2020

ServerLog:

{"level":"debug","ts":1587995042.5387802,"caller":"plugin/hclog_adapter.go:53","msg":"panic: runtime error: index out of range [1] with length 1","plugin_id":"com.github.scottleedavis.mattermost-
plugin-remind"}

I think normalizeDate method should be rewritten.

I have found a similar issue.
reminder request: /remind me test 30th of April
log:

{"level":"debug","ts":1587995746.0320342,"caller":"plugin/hclog_adapter.go:53","msg":"panic: runtime error: index out of range [1] with length 1","plugin_id":"com.github.scottleedavis.mattermost-
plugin-remind"}

issue of my request is here:
file: parse.go

  mon, mErr := strconv.Atoi(parts[0])
  day, dErr := strconv.Atoi(parts[1])
  year, yErr := strconv.Atoi(parts[2])

len of parts = 1

@scottleedavis scottleedavis added the Type/Bug Something isn't working label May 2, 2020
@scottleedavis
Copy link
Owner

@Chubik are you able to issue a PR to resolve this issue?

@Chubik
Copy link
Contributor

Chubik commented May 4, 2020

@Chubik are you able to issue a PR to resolve this issue?

sorry for delay, missed your message.
Ill add PR fixes of my issue till end of the week or on start of the next one.
Unfortunately, I didnt investigated issue blark012, Ill try to check too.

@scottleedavis
Copy link
Owner

#184

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants