{"action":"created","issue":{"url":"https://api.github.com/repos/google/grr/issues/163","labels_url":"https://api.github.com/repos/google/grr/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/google/grr/issues/163/comments","events_url":"https://api.github.com/repos/google/grr/issues/163/events","html_url":"https://github.com/google/grr/pull/163","id":69923376,"number":163,"title":"Changed default behavior of Read to be consistent with normal file objec...","user":{"login":"pidydx","id":8451350,"avatar_url":"https://avatars.githubusercontent.com/u/8451350?v=3","gravatar_id":"","url":"https://api.github.com/users/pidydx","html_url":"https://github.com/pidydx","followers_url":"https://api.github.com/users/pidydx/followers","following_url":"https://api.github.com/users/pidydx/following{/other_user}","gists_url":"https://api.github.com/users/pidydx/gists{/gist_id}","starred_url":"https://api.github.com/users/pidydx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pidydx/subscriptions","organizations_url":"https://api.github.com/users/pidydx/orgs","repos_url":"https://api.github.com/users/pidydx/repos","events_url":"https://api.github.com/users/pidydx/events{/privacy}","received_events_url":"https://api.github.com/users/pidydx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-21T18:52:32Z","updated_at":"2015-04-21T22:58:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/grr/pulls/163","html_url":"https://github.com/google/grr/pull/163","diff_url":"https://github.com/google/grr/pull/163.diff","patch_url":"https://github.com/google/grr/pull/163.patch"},"body":"...t behavior if no size is provided.\r\n\r\nThis causes problems when writing parsers that use external modules that expect a file_object and they call .read().  "},"comment":{"url":"https://api.github.com/repos/google/grr/issues/comments/94966607","html_url":"https://github.com/google/grr/pull/163#issuecomment-94966607","issue_url":"https://api.github.com/repos/google/grr/issues/163","id":94966607,"user":{"login":"scudette","id":3856546,"avatar_url":"https://avatars.githubusercontent.com/u/3856546?v=3","gravatar_id":"","url":"https://api.github.com/users/scudette","html_url":"https://github.com/scudette","followers_url":"https://api.github.com/users/scudette/followers","following_url":"https://api.github.com/users/scudette/following{/other_user}","gists_url":"https://api.github.com/users/scudette/gists{/gist_id}","starred_url":"https://api.github.com/users/scudette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scudette/subscriptions","organizations_url":"https://api.github.com/users/scudette/orgs","repos_url":"https://api.github.com/users/scudette/repos","events_url":"https://api.github.com/users/scudette/events{/privacy}","received_events_url":"https://api.github.com/users/scudette/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T22:58:24Z","updated_at":"2015-04-21T22:58:24Z","body":"I think its ok to limit the read to a fairly small number say 10mb? Maybe even make it a configuration file parameter. If the parser expects that it can read the entire file into a string it probably does not mean to use more than a few mb. If that causes the parser to miss data then it is a bug in the parser anyway since it is buggy to make an unbounded read in the first place - so its not a big deal.\r\n\r\nThe current design is pretty strict in order to try and trap these kind of API misuse so we can fix them. Maybe a configuration parameter with default behaviour being very strict but settings which allow soft limits is the best approach?"}}