Skip to content

Commit

Permalink
Allow longer device IDs in link ops
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro committed Mar 28, 2017
1 parent 33a7c6a commit 8b5178b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
- Allow group batch fetch by both ID and name.
- Increase heartbeat server time precision.
- Rework the embedded dashboard.
- Allow up to 64 characters for device ID linking.

### Fixed
- Fix Facebook unlink operation.
Expand Down
4 changes: 2 additions & 2 deletions server/pipeline_link_unlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func (p *pipeline) linkDevice(logger zap.Logger, session *session, envelope *Env
} else if invalidCharsRegex.MatchString(deviceID) {
session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, no spaces or control characters allowed"))
return
} else if len(deviceID) < 10 || len(deviceID) > 36 {
session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, must be 10-36 bytes"))
} else if len(deviceID) < 10 || len(deviceID) > 64 {
session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, must be 10-64 bytes"))
return
}

Expand Down

0 comments on commit 8b5178b

Please sign in to comment.