Skip to content

Conversation

@charettes
Copy link
Contributor

Listing related fields can leak sensitive data and result in poor performance
when dealing with large result sets.

Large result sets should be exposed by a dedicated endpoint instead.

@charettes charettes changed the title Fixed #3751 -- Stopped listing all related field choices through metadata. Fixed #3751 -- Stopped listing related field choices through metadata. Mar 29, 2016
…tadata.

Listing related fields can leak sensitive data and result in poor performance
when dealing with large result sets.

Large result sets should be exposed by a dedicated endpoint instead.
@charettes charettes force-pushed the related-field-choices-metadata branch from 69c69b8 to a6732e2 Compare March 29, 2016 17:29
@xordoquy
Copy link
Contributor

I'm tempted to move this through the deprecation path.
The alternative would be to consider this a security improvement and go through in which case I'd probably add an option to turn this off and keep compatibility.

@xordoquy xordoquy added this to the 3.4.0 Release milestone Mar 29, 2016
@charettes
Copy link
Contributor Author

I have deprecation path in mind, I'll submit it in a few moment.

@xordoquy
Copy link
Contributor

Thanks !

@lovelydinosaur
Copy link
Contributor

I'd probably be okay with us simply dropping this in a median version, so long as we call it out.
We don't have any strict contract around what to expect from OPTIONS responses, so...

@craigds
Copy link
Contributor

craigds commented Apr 22, 2016

Could this be merged? This fixes #3751 which is a security (and major performance) issue so seems important to get it in.

@lovelydinosaur lovelydinosaur merged commit 014e24b into encode:master Jun 1, 2016
@lovelydinosaur lovelydinosaur changed the title Fixed #3751 -- Stopped listing related field choices through metadata. Do not list related field choices in OPTIONS requests. Jun 1, 2016
@lovelydinosaur
Copy link
Contributor

Great stuff, thank you!

@charettes charettes deleted the related-field-choices-metadata branch June 1, 2016 15:46
@silviogutierrez
Copy link
Contributor

Hey guys,

Fantastic library and great work overall. For those that actually do use this feature, will there be an opt-in workaround[1]? I looked at the merge commit and it seems like a blanket check for all related fields.

It's pretty convenient to build a form off a single OPTIONS request.

Thanks for all your work,

Silvio

[1]: Mandatory: https://xkcd.com/1172/

@lovelydinosaur
Copy link
Contributor

You'd need to use a custom metadata class, overriding get_field_info so that you have the 3.3.x behavior, not the 3.4.x behavior. We should include that in the release notes.

@wimglenn
Copy link
Contributor

Related example of overriding get_field_info: http://stackoverflow.com/q/35564784/674039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants