Skip to content

Conversation

@shukitchan
Copy link
Contributor

…lement a whitelist mechanism to allow the specified cookies for it

Original code and idea contributed by Chris Rohlf (chris.rohlf@gmail.com)

@bryancall / @jpeach , pls help to review. Thanks a lot.

@atsci
Copy link

atsci commented Jul 14, 2016

Linux build failed! See https://ci.trafficserver.apache.org/job/Github-Linux/322/ for details.

@atsci
Copy link

atsci commented Jul 14, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/428/ for details.

@shukitchan
Copy link
Contributor Author

[approve ci]

@atsci
Copy link

atsci commented Jul 14, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/429/ for details.

@atsci
Copy link

atsci commented Jul 14, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/430/ for details.

@atsci
Copy link

atsci commented Jul 14, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/323/ for details.

@struct
Copy link

struct commented Jul 14, 2016

Looks like this version of the patch leaves out wildcard support https://github.com/apache/trafficserver/pull/798/files#diff-a6bc69fbcc52f7fff04507b2a650ac4fR370 I think its sane to support that functionality as long as its not the default

@zwoop zwoop added the Plugins label Jul 14, 2016
@shukitchan
Copy link
Contributor Author

@struct , i can add the wildcard support tonight.

e.g. whitelistCookie *

That will mean we allow all cookies when we are using HTTP_COOKIE esi variables

@shukitchan
Copy link
Contributor Author

@zwoop can you take a look at this as well?

@shukitchan
Copy link
Contributor Author

wildcard support is added.

@atsci
Copy link

atsci commented Jul 15, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/431/ for details.

@atsci
Copy link

atsci commented Jul 15, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/324/ for details.

@shukitchan
Copy link
Contributor Author

@bryancall / @jpeach / @zwoop any comments here? thanks.


bool found = false;
for (Utils::HeaderValueList::iterator lz = _whitelistCookies.begin(); lz != _whitelistCookies.end(); ++lz) {
std::string c = *lz;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this is the norm for the esi, but why create this intermediary std::string c? That seems inefficient and unnecessary ? Can't you just use the *lz ?

@zwoop zwoop added this to the 7.0.0 milestone Jul 17, 2016
@shukitchan
Copy link
Contributor Author

@zwoop , i just did the cleanup. Good to merge?

@atsci
Copy link

atsci commented Jul 17, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/442/ for details.

@atsci
Copy link

atsci commented Jul 17, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/336/ for details.

@shukitchan
Copy link
Contributor Author

@sudheerv can you help to do a review for me?

_insert(_dict_data[HTTP_COOKIE], string(iter->name, iter->name_len), string(iter->value, iter->value_len));
_debugLog(_debug_tag, "[%s] Inserted cookie with name [%.*s] and value [%.*s]", __FUNCTION__, iter->name_len, iter->name,
iter->value_len, iter->value);
std::string v = iter->name;
Copy link
Contributor

Choose a reason for hiding this comment

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

The variable names are not chosen well. Can you please not use 1 or 2 characters for variable names.

@bryancall
Copy link
Contributor

@shukitchan Overall it looks good. I had one minor comment.

@shukitchan
Copy link
Contributor Author

updated just now. will merge after squashing commits into one. thanks.

…lement a whitelist mechanism to allow the specified cookies for it

Original code and idea contributed by Chris Rohlf
@shukitchan shukitchan merged commit 880127b into apache:master Jul 20, 2016
@atsci
Copy link

atsci commented Jul 20, 2016

Linux build failed! See https://ci.trafficserver.apache.org/job/Github-Linux/353/ for details.

@atsci
Copy link

atsci commented Jul 20, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/457/ for details.

@atsci
Copy link

atsci commented Jul 20, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/352/ for details.

bneradt added a commit to bneradt/trafficserver that referenced this pull request Jul 12, 2024
Merge ASF master into 10.0.x
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants