Skip to content

server: validate stream names#104

Open
emilyalbini wants to merge 2 commits intomainfrom
ea-server-stream
Open

server: validate stream names#104
emilyalbini wants to merge 2 commits intomainfrom
ea-server-stream

Conversation

@emilyalbini
Copy link
Copy Markdown
Member

As suggested in #103 (comment), this adds some validation to stream names received by the server.

Copy link
Copy Markdown
Collaborator

@jclulow jclulow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think factory_worker_append() in server/src/api/factory.rs also needs to use validate_stream()?

Comment thread server/src/api/worker.rs Outdated
@emilyalbini
Copy link
Copy Markdown
Member Author

Done both!

I think factory_worker_append() in server/src/api/factory.rs also needs to use validate_stream()?

I wonder, would it make sense to turn Stream on the server in a newtype Stream(String), and requiring validation when a new instance of Stream is created? That way we'd never forget validation wherever we decide to add events.

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

Successfully merging this pull request may close these issues.

2 participants