-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add propagation string case functions and Array.join function #98
Conversation
src/api/array_join.cc
Outdated
int separatorLength) { | ||
auto length = arr->Length(); | ||
int offset = 0; | ||
auto newRanges = transaction->GetSharedVectorRange(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are getting and potentially creating a new SharedVector each time that join
method is executed, even if it doesn't have any tainted object. Can we delay the initialization of newRanges
to the point that we know that it will be necessary?
src/api/string_case.cc
Outdated
} | ||
|
||
try { | ||
auto ranges = taintedObj ? taintedObj->getRanges() : nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The : nullptr
is not possible, you're already checking !taintedObj
in L57.
auto ranges = taintedObj ? taintedObj->getRanges() : nullptr; | |
auto ranges = taintedObj->getRanges(); |
1cbd392
to
051df64
Compare
6c968b4
to
c6f7d0c
Compare
c6f7d0c
to
155bbe0
Compare
What does this PR do?
Adds propagation for string case functions
toLowerCase
andtoUpperCase
.Adds propagation for Array.join function.
Motivation
Improve propagation.
Checklist
APPSEC-47443