Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not create extenstion symbol if extension does not exist #291

Merged
merged 1 commit into from
Dec 14, 2012

Conversation

flyerhzm
Copy link
Contributor

for request like http://localhost/v1/test without .json at the end, it will create symbol :"/v1/test", which leads to memory leak

dblock added a commit that referenced this pull request Dec 14, 2012
do not create extenstion symbol if extension does not exist
@dblock dblock merged commit 640a80b into ruby-grape:master Dec 14, 2012
@jeltz
Copy link

jeltz commented Dec 17, 2012

To me the leak looks only like it is fixed for normal users. Malicious users should still be able to cause a memory leak by generating requests with random extensions.

@flyerhzm
Copy link
Contributor Author

@jeltz you are right, the better way is not compare extension as symbol, use string instead.

I used grape to build an internal api service, so that's not a problem to me.

@dblock
Copy link
Member

dblock commented Dec 17, 2012

@jeltz - would you please be so kind to open an issue with maybe a repro for this? Thanks.

@dblock
Copy link
Member

dblock commented Dec 27, 2012

I opened #301.

@jeltz
Copy link

jeltz commented Dec 28, 2012

@dblock Thanks!

@dblock
Copy link
Member

dblock commented Dec 28, 2012

I found another instance where this is a problem, cookie processing.

Please double-check my fixes:

Cookie to_sym fix in df8665c
Formatter middleware to_sym fix in db7d190

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.

3 participants