Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vinicius Mesel Newsgroups: comp.lang.python Subject: Enc: Re: WP-A: A New URL Shortener Date: Thu, 17 Mar 2016 15:10:03 -0300 Lines: 101 Message-ID: References: <1537bd9e261.12a0e5b4a204345.4468160629979098801@vmesel.com> <9727BC5A-67B2-49A6-9AFF-8C244A53300C@vmesel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 5tv36HXB4yzOlYWIAJzL+Q6tNWjzfn0wVC7yW4Hg53Gg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'exercise': 0.03; 'schema': 0.05; 'bootstrap': 0.07; 'formatting': 0.07; 'cc:addr:python- list': 0.09; 'answering': 0.09; 'corrections': 0.09; 'git': 0.09; 'imports': 0.09; 'sql,': 0.09; 'sqlite': 0.09; 'statements': 0.09; 'url:github': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.10; 'django': 0.13; '>>>': 0.15; 'commit': 0.15; '2016': 0.16; 'chris,': 0.16; 'git.': 0.16; 'guys,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'said.': 0.16; 'sees': 0.16; 'stored.': 0.16; 'subject:URL': 0.16; 'ugly.': 0.16; 'x-mailer:zoho mail': 0.16; 'wrote:': 0.16; 'contribute': 0.16; 'string': 0.17; '<': 0.18; 'implementing': 0.18; 'version.': 0.18; '>': 0.18; 'email addr:gmail.com>': 0.18; 'programmer': 0.18; 'hey': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'url:gt': 0.22; 'cc:no real name:2**0': 0.22; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'header:User-Agent:1': 0.26; 'chris': 0.26; '----': 0.27; 'checking': 0.27; 'coding': 0.27; 'said,': 0.27; 'bad.': 0.29; 'project:': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.30; 'at:': 0.31; 'everyone': 0.31; 'getting': 0.33; 'source': 0.33; 'url:python': 0.33; 'message.': 0.33; "i'll": 0.33; 'url:listinfo': 0.34; 'add': 0.34; 'list': 0.34; 'gets': 0.35; 'so,': 0.35; 'next': 0.35; 'stable': 0.35; 'quite': 0.35; 'something': 0.35; 'community': 0.36; 'should': 0.36; 'project': 0.36; 'url:org': 0.36; 'framework': 0.36; 'projects.': 0.36; 'urls': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'thanks': 0.37; 'list.': 0.37; 'wanted': 0.37; 'version': 0.38; 'mean': 0.38; 'subject:-': 0.39; 'url:mail': 0.40; 'some': 0.40; 'software': 0.40; 'future': 0.60; 'your': 0.60; 'share': 0.61; 'avoid': 0.61; 'replying': 0.61; 'show': 0.62; 'great': 0.63; 'march': 0.64; 'you.': 0.64; 'url:co': 0.65; 'mar': 0.65; 'today': 0.65; 'decided': 0.66; 'reply': 0.68; 'yourself': 0.73; '(hint:': 0.84; '-0300': 0.84; 'find.': 0.84; 'hour,': 0.84; 'meu': 0.84; 'qui,': 0.84; 'working,': 0.84; '1:18': 0.91; 'different.': 0.91; 'you\xe2\x80\x99re': 0.91; 'ipad': 0.95 In-Reply-To: X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Zoho-Virus-Status: 1 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105133 Hi Chris, Thanks for giving me the tip to reply to everyone in the list. So, I'll be implementing the anti-injection code in this next version that = is going to come out. The SQL Schema is going to be shown in the README.md when it gets ready I'l= l tell to you. Thanks for getting involved with the project! ---- Em Qui, 17 Mar 2016 13:05:47 -0300 Chris Warrick <kwpolska@gmail.co= m> escreveu ----=20 Please use reply-all in the future so that the list sees your message.=20 =20 On 17 March 2016 at 11:38, Vinicius <me@vmesel.com> wrote:=20 > Thanks for replying Chris,=20 >=20 > Enviado do meu iPad=20 >=20 >> Em 16 de mar de 2016, =C3=A0s 1:18 PM, Chris Warrick <kwpolska@= gmail.com> escreveu:=20 >>=20 >>> On 15 March 2016 at 20:56, Vinicius Mesel <me@vmesel.com>= ; wrote:=20 >>> Hey guys,=20 >>>=20 >>> I'm a 16 year old Python Programmer that wanted to do somethin= g different.=20 >>> But, like we know, ideas are quite difficult to find.=20 >>> So I decided to develop a URL Shortener to help the Python com= munity out and share my coding knowledge, and today the project was launche= d with its first stable version.=20 >>> So if you want to see the software working, go check it out at= : http://wp-a.co/=20 >>> Or if you want to see the source code to contribute and help t= he project: https://github.com/vmesel/WP-A.CO=20 >>>=20 >>>=20 >>> Hugs,=20 >>> Vinicius Mesel=20 >>> Brazilian and Portuguese Speaker=20 >>> http://www.vmesel.com=20 >>>=20 >>>=20 >>>=20 >>> --=20 >>> https://mail.python.org/mailman/listinfo/python-list=20 >>=20 >> This is a great exercise =E2=80=94 however, your code is bad. You = use string=20 >> formatting to create SQL, which leads to SQL injection=20 >> vulnerabilities. Please educate yourself on what those mean and ho= w to=20 >> avoid that in Python (hint: prepared statements). Also, you should= not=20 >> commit your sqlite database to git.=20 >>=20 > Thanks for checking out my code and answering me, I will do the correc= tions for the SQL Injection vulnerabilities with prepared statements like y= ou said.=20 >=20 > The database in the git is to show to everyone how the URL is stored.= =20 =20 You can show people a schema and write a small script that imports it.=20 You may add some demo URLs if you insist.=20 =20 >> That said, an URL shortener can be written in Django in less than = an=20 >> hour, and it will be even neater.=20 >>=20 >=20 > I did not make it in Django because I was in need to learn flask for o= ther projects.=20 >=20 >=20 >> (PS. the page=E2=80=99s really ugly. Consider using Bootstrap or s= ome other=20 >> existing framework if you=E2=80=99re not good at designing pretty = things.)=20 >=20 > I'll consider it.=20 >=20 >> --=20 >> Chris Warrick <https://chriswarrick.com/>=20 >> PGP: 5EAAEA16=20 >=20 > @vmesel=20 =20 =20 =20 --=20 Chris Warrick <https://chriswarrick.com/>=20 PGP: 5EAAEA16=20