Skip to content

Commit

Permalink
Merge pull request #2291 from overleaf/ta-events-validate
Browse files Browse the repository at this point in the history
Validate Events with Regex

GitOrigin-RevId: f0a57345862ce4daefaa9f01b851d446230ed46d
  • Loading branch information
timothee-alby authored and sharelatex committed Nov 4, 2019
1 parent 34741a1 commit e9465e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/Features/Analytics/AnalyticsRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const AnalyticsProxy = require('./AnalyticsProxy')

module.exports = {
apply(webRouter, privateApiRouter, publicApiRouter) {
webRouter.post('/event/:event', AnalyticsController.recordEvent)
webRouter.post(
'/event/:event([a-z0-9-_]+)',
AnalyticsController.recordEvent
)

webRouter.put(
'/editingSession/:projectId',
Expand Down

0 comments on commit e9465e1

Please sign in to comment.