Title: MySQLdb._escape_string() broken in Python 2.7 · Issue #1 · PythonProgramming/PythonProgramming.net-Website · GitHub
Open Graph Title: MySQLdb._escape_string() broken in Python 2.7 · Issue #1 · PythonProgramming/PythonProgramming.net-Website
X Title: MySQLdb._escape_string() broken in Python 2.7 · Issue #1 · PythonProgramming/PythonProgramming.net-Website
Description: I was having a bunch of trouble getting the registration page to work and someone on stackoverflow (http://stackoverflow.com/questions/3617052/escape-string-python-for-mysql) suggested an alternate way after I found a bunch of posts rela...
Open Graph Description: I was having a bunch of trouble getting the registration page to work and someone on stackoverflow (http://stackoverflow.com/questions/3617052/escape-string-python-for-mysql) suggested an alternate...
X Description: I was having a bunch of trouble getting the registration page to work and someone on stackoverflow (http://stackoverflow.com/questions/3617052/escape-string-python-for-mysql) suggested an alternate...
Opengraph URL: https://github.com/PythonProgramming/PythonProgramming.net-Website/issues/1
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MySQLdb._escape_string() broken in Python 2.7","articleBody":"I was having a bunch of trouble getting the registration page to work and someone on stackoverflow (http://stackoverflow.com/questions/3617052/escape-string-python-for-mysql) suggested an alternate way after I found a bunch of posts relating to the escape_string currently being broken. I edited `__init__.py` registration page with the following and was able to get it to work. \n\n```\nsql_check_reg = \"SELECT * FROM users WHERE username = (%s)\"\nx = c.execute(sql_check_reg, (username,))\n```\n\nand:\n\n```\nsql_insert_reg = \"INSERT INTO users (username, password, email) VALUES (%s, %s, %s)\"\nc.execute(sql_insert_reg, (username, password, email))\n```\n\nMaybe you could verify that this is in fact a good method and not susceptible to sql injection?\n","author":{"url":"https://github.com/spizeck","@type":"Person","name":"spizeck"},"datePublished":"2016-03-17T22:38:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1/PythonProgramming.net-Website/issues/1"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:86b6eeb9-2869-1998-a510-a1cae4dcff38 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5BC:3CD775:1FB2013:2C01250:69728AFA |
| html-safe-nonce | 845aa7d692ddfe1555934ed31c7627237ad5ed1cf42289598738b79f51de4181 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUJDOjNDRDc3NToxRkIyMDEzOjJDMDEyNTA6Njk3MjhBRkEiLCJ2aXNpdG9yX2lkIjoiNDcwMzY5NTc5NDYxMzY4NDk4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ea23660b557fae16dd3041b4e9108ca79a57aa2cb40a3ffabb0c07c3a9998bbf |
| hovercard-subject-tag | issue:141724340 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PythonProgramming/PythonProgramming.net-Website/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c0f302647d3b054d1c1ad090fb826689b4167e9efcf336b6d7c2c42141c22d45/PythonProgramming/PythonProgramming.net-Website/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c0f302647d3b054d1c1ad090fb826689b4167e9efcf336b6d7c2c42141c22d45/PythonProgramming/PythonProgramming.net-Website/issues/1 |
| og:image:alt | I was having a bunch of trouble getting the registration page to work and someone on stackoverflow (http://stackoverflow.com/questions/3617052/escape-string-python-for-mysql) suggested an alternate... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | spizeck |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7631aa5e32c11c73e45f19f2aaeaa7e0305d2ec80414866e8b020f3c2144ccae |
| turbo-cache-control | no-preview |
| go-import | github.com/PythonProgramming/PythonProgramming.net-Website git https://github.com/PythonProgramming/PythonProgramming.net-Website.git |
| octolytics-dimension-user_id | 11021874 |
| octolytics-dimension-user_login | PythonProgramming |
| octolytics-dimension-repository_id | 44985737 |
| octolytics-dimension-repository_nwo | PythonProgramming/PythonProgramming.net-Website |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 44985737 |
| octolytics-dimension-repository_network_root_nwo | PythonProgramming/PythonProgramming.net-Website |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 40f44656d2185a364dd710032a2e10ee2f1d7e20 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width