8000 Supporting filter_friendly_name by wanjunsli · Pull Request #245 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

Supporting filter_friendly_name #245

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

Merged
merged 10 commits into from
Jan 28, 2016

Conversation

wanjunsli
Copy link
Contributor

No description provided.

return str({
'workflow_rules': self.workflow_rules,
'default': self.default_filter,
'rules': self.rules
Copy link

Choose a reason for hiding this comment

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

This repr isn't consistent with the variable names.

} 8000

expected_config_json = json.dumps(expected_config_data,
default=lambda o: o.__dict__,
Copy link

Choose a reason for hiding this comment

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

is default=lambda o: o.__dict__, necessary when expected_config_data is a dict?

@wanjunsli
Copy link
Contributor Author

Reverted all changes. Per convo with @jwitz10, stripping user input of "filter_friendly_name" and using "friendly_name" instead.

< 8000 /task-lists>

@@ -21,6 +21,9 @@ def to_json(self):

@staticmethod
def json2obj(data):
# replace instances of "filter_friendly_name" with "friendly_name"
data = data.replace("filter_friendly_name", "friendly_name")
Copy link

Choose a reason for hiding this comment

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

this is very dangerous. If the user has filter_friendly_name in the expression or some other value, this will break their software.

Copy link

Choose a reason for hiding this comment

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

Just going on record and saying that I have absolutely no idea what this is
and have never been involved and don't know u people. Good luck with your
software! :))

On Tue, Jan 19, 2016 at 6:11 PM, Ragil notifications@github.com wrote:

In twilio/task_router/workflow_config.py
#245 (comment):

@@ -21,6 +21,9 @@ def to_json(self):

 @staticmethod
 def json2obj(data):
  •    # replace instances of "filter_friendly_name" with "friendly_name"
    
  •    data = data.replace("filter_friendly_name", "friendly_name")
    

this is very dangerous. If the user has filter_friendly_name in the
expression or some other value, this will break their software.


Reply to this email directly or view it on GitHub
https://github.com/twilio/twilio-python/pull/245/files#r50197230.

Jake Witz
Member Relations & Communications
Wisconsin Union Membership Offices
(847) 999 8755

@Ragil
Copy link
Ragil commented Jan 20, 2016

+1

jingming added a commit that referenced this pull request Jan 28, 2016
@jingming jingming merged commit 02dda06 into twilio:master Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0