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: github.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:e5148dd3-68f4-ab28-9028-2d7d372d29b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE44:1462F2:32A4AA1:45643CA:6972C3B0 |
| html-safe-nonce | 1fec6572b60cb1d081cf8cc0861f1d58ac0d536dd7095a2a9a11b143de8f26b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTQ0OjE0NjJGMjozMkE0QUExOjQ1NjQzQ0E6Njk3MkMzQjAiLCJ2aXNpdG9yX2lkIjoiNzQ0ODExOTYxMjU5NjczMjg0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0f259125ae70e598cc7ac81f571d6e4bdf377aa068c23b9834041e2151228f5f |
| 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 | aa656e37a6f46b81c2416d9c983f7c54e264ee31be17c0e6c9414b9f9f9c6eb4 |
| 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 | add6bd61de5b348d2978a698a5796a7d0438e7be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width