2:19 AM
jennifer
Why isn't it... protected? :|
2:20 AM
Koterpillar
jennifer: where?
2:20 AM
jennifer: finish part 4 of the tutorial before doing any upload stuff
2:20 AM
jennifer
2:20 AM
lol
2:20 AM
Koterpillar
that's not Django
2:20 AM
jennifer
Finish tutorial this man says
2:20 AM
Koterpillar
2:21 AM
cybo_
jennifer, because people aren't security conscious
2:21 AM
jennifer
I know, I'm following a different tutorial because I just need to get this going with
2:21 AM
cybo_, I'm doing this for a security class, so it's really just hw
2:21 AM
My professor said to use php so she can show us how to find bugs but I insisted on python because I said in the real world I'd never lower myself to working with php grubs
2:21 AM
She said "okay"
2:22 AM
So here I am trying to learn Django in a hour
2:22 AM
It's actually a lot of fun
2:22 AM
I can see some security problems with some of these codes on github
2:22 AM
cybo_
jennifer, it probably won't be all the beneficial to do it in django then
2:22 AM
jennifer
Whether it's Amazon API code or some other crap
2:22 AM
cybo_
it does a lot for you out of the box
2:22 AM
jennifer
cybo_, why not? I just wanna get this homework done with, which is create a simple upload website
2:22 AM
isthmian has left the channel
2:22 AM
...
2:23 AM
What are you suggesting sir?
2:23 AM
cybo_
if the point of the class is to learn about different security issues, then you won't learn them by not dealing with them directly
2:23 AM
jessamynsmith joined the channel
2:23 AM
jennifer
Oh no
2:23 AM
2:23 AM
I will learn
2:23 AM
Don't you worry your little heart
2:24 AM
jennifer rubs grubby hands.
2:24 AM
cybo_
which is possibly why you were suggested to use php ;)
2:24 AM
jennifer
I hate php and would rather starve than work with php
2:24 AM
cybo_
have you ever used it?
2:24 AM
jennifer
I'm already starving too hm
2:24 AM
yeah
2:24 AM
I have a few small project in php when I first started out
2:25 AM
Php taught me a lot but security isn't one of the,m
2:25 AM
Did you see the link or did I send the wrong one?
2:25 AM
2:25 AM
cybo_
the spec? yes
2:26 AM
jennifer
here
2:26 AM
2:26 AM
Have fun
2:26 AM
Gonna need 30 min to focus on making this magic work
2:27 AM
Where can I read about {% I see stuff here %}?
2:28 AM
FunkyBob
templates
2:28 AM
like you saw in the tutorial
2:28 AM
you did do the tutorial, right?
2:28 AM
jarshwah_
she's half way through
2:29 AM
FunkyBob
ah
2:29 AM
jarshwah_
(assuming she)
2:29 AM
jessamynsmith has quit
2:29 AM
FunkyBob
2:29 AM
jennifer
I did the tutorial halfway as said, then I went onto another tutorial that focused on what I needed, I got most of the idea heh
2:30 AM
Koterpillar
those things between {% %} are called template tags
2:30 AM
EyePulp joined the channel
2:32 AM
ironfroggy joined the channel
2:32 AM
jennifer
Oh cool this tutorial uses / teaches csrf_token
2:34 AM
Why does a few of these line have double {{}}?
2:34 AM
andrew9184 joined the channel
2:34 AM
Koterpillar
{{ }} is variable interpolation
2:35 AM
{% %} run Python code from a register of functions (template tags)
2:35 AM
jennifer
Oh
2:35 AM
Literal string
2:35 AM
Got it
2:35 AM
jarshwah_
variable
2:35 AM
Koterpillar
{{ }} print the value of an object referenced inside, can't run arbitrary code
2:36 AM
ironfroggy has quit
2:36 AM
the precise syntax of what can be used inside {{ }} are explained somewhere in the docs, the point being is that it's intentionally limited
2:36 AM
s/are/is/
2:36 AM
bambanx
why people love jinja templates?
2:37 AM
jennifer
ya
2:37 AM
2:37 AM
Koterpillar
bambanx: because they think Python code in templates are fine, probably?
2:37 AM
jennifer
It's not that magical
2:37 AM
Koterpillar
s/is/are/ grrrrrrrrr
2:37 AM
jennifer
Bambanx do you have an alternative?
2:37 AM
Koterpillar
jennifer: default Django templates
2:37 AM
jennifer
Btw I can delete pyc files when uploading for my professor, yeah?
2:38 AM
She doesn't need the pyc files I think
2:38 AM
Koterpillar
jennifer: correct, but how do you expect them to run your code?
2:38 AM
jennifer
I give them the py files
2:38 AM
The source code
2:38 AM
Koterpillar
It's just they'll have to download Django and all
2:38 AM
jennifer
oh
2:39 AM
bambanx
Koterpillar, what do you think? its good practice to use python on templates? what are your thoughts?
2:39 AM
jennifer
heh
2:39 AM
Koterpillar
bambanx: no
2:39 AM
jennifer: and Python
2:39 AM
jennifer
I dunno why I cackled at that but I guess it's funny
2:39 AM
bambanx
hello jennifer
2:39 AM
dashdanw
what would be the best way to migrate a set of tags from a taggit TagableManager field from one model to another?
2:39 AM
Koterpillar
bambanx: I consider Hamlet a good templating system (warning: not Python)
2:41 AM
bambanx
Koterpillar, its kinda pug(jade) ?
2:41 AM
Koterpillar
mmm, not familiar with those. It's more about the type safety
2:41 AM
bambanx
ok
2:41 AM
thanks for share your wisdom Koterpillar
2:42 AM
Koterpillar
but then again, I'm not good enough with Web design
2:43 AM
jennifer
Koterpillar, what do you use Django for?
2:43 AM
Koterpillar
web apps
2:44 AM
but our team has a total of 2 people whose job is to suffer CSS
2:45 AM
moldy_ joined the channel
2:46 AM
moldy has quit
2:46 AM
asadjb joined the channel
2:49 AM
jennifer
Hm this is new
2:49 AM
bambanx
guys what is the way to act if some guy stole your database of some apps ? if this database have all password of your users? those are encrypted?
2:49 AM
jennifer
Class inside of a class? that's pretty rare in C++
2:49 AM
What does that do in python?
2:49 AM
Koterpillar
jennifer: introduces a class
2:49 AM
jennifer: only visible inside the scope
2:49 AM
jennifer
bambanx, you freak out, you scold your security team, then you figure out damage control
2:49 AM
Then you get some paperwork done, talk to your lawyer
2:49 AM
Get everybody to assess the damage done and figure out how to prevent in the future
2:49 AM
Notify customers
2:50 AM
If those passwords are poorly hashed, you're in trouble
2:50 AM
Koterpillar
jennifer: classes are dynamic, like everything else in Python
2:50 AM
jennifer
Send out a mass email to get those users to change their pw asap
2:50 AM
Um I forgot what else you can do
2:50 AM
Koterpillar, okay
2:50 AM
ty
2:50 AM
Koterpillar
jennifer: you can introduce functions inside classes inside functions...
2:50 AM
bambanx
ok but in terms of programming what you can do? the password are encrypted on the database?
2:50 AM
Koterpillar
bambanx: whatever you _could_ do is already irrelevant
2:50 AM
FunkyBob
bambanx: yes, passwords are encrypted
2:50 AM
Diemuzi has quit
2:51 AM
hashed, in fact... so there's no decryption possible
2:51 AM
jennifer
Koterpillar, I know about functions inside of a functiojn
2:51 AM
But not class inside of a class
2:51 AM
asadjb has quit
2:51 AM
FunkyBob, it can be broken
2:51 AM
Hashed doesn't mean shit nowadays
2:51 AM
bambanx
what is the diference of hashed with encrypted?
2:52 AM
jennifer
bambanx, if it's hashed, it's usually one way
2:52 AM
FunkyBob
bambanx: hash isn't reversible
2:52 AM
Koterpillar
jennifer: a class is just a function that takes constructor arguments and returns *something* with methods
2:52 AM
jennifer
If it's encrypted, it can be decrypted
2:52 AM
Koterpillar
jennifer: it will be costly
2:52 AM
FunkyBob
jennifer: well, the default hashing in django's auth is salted and iterated 20,000 times or more
2:52 AM
jennifer
FunkyBob, don't say, it's usually not easily reversible, but that's a false sense of security
2:52 AM
Somebody with enough time and knowledge will crack it open
2:52 AM
well
2:52 AM
okay
2:52 AM
So that just means django's hashing is decent
2:53 AM
bambanx
thanks guys
2:53 AM
jennifer
I'm curious as to how Django would hold up against various attack vectors out there that could, on nation-state level crack passwords like nobody
2:53 AM
FunkyBob
it should be upped to about 100,000 iterations in 2.0, iirc
2:54 AM
it's upped every release to compensate for improved hardware
2:54 AM
jennifer
Good job
2:54 AM
Ariel_Calzada has quit
2:54 AM
Like Drupal, they try to keep up to date then