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

Patch for v10.2.7 #190

Open
wants to merge 6 commits into
base: origin-v10.2.7-1733765573
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
commit patch 19982637
  • Loading branch information
turly221 committed Dec 9, 2024
commit 10d2580589dc41bc2e549b2e0ca05b0c1a92612e
5 changes: 3 additions & 2 deletions src/rgw/rgw_cors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ void RGWCORSRule::format_exp_headers(string& s) {
if (s.length() > 0)
s.append(",");
// these values are sent to clients in a 'Access-Control-Expose-Headers'
// response header, so we escape '\n' to avoid header injection
boost::replace_all_copy(std::back_inserter(s), header, "\n", "\\n");
// response header, so we escape '\n' and '\r' to avoid header injection
std::string tmp = boost::replace_all_copy(header, "\n", "\\n");
boost::replace_all_copy(std::back_inserter(s), tmp, "\r", "\\r");
}
}

Expand Down