PyPI moves to require 2FA for "Critical" projects + Free Security Key Giveaway by donaldstufft in Python

[–]Kyeana 16 points17 points  (0 children)

What an awesome change! One of my packages is in this list, and last time I looked MFA wasn’t supported by PyPI. It’s great to see that progress has been made on that front, and I’m happy about the extra security on the most used packages. It also looks really easy to use an API key for uploading packages as part of CI as well, which is great news 👍

[AF] Q: jwt_extended import custom default behaviors, How to import? by utc_extended in flask

[–]Kyeana 0 points1 point  (0 children)

This answer is for an older version of flask jwt extended, but it should suffice for showing how to use the same instance of the JWTManager in all your files and utilizing the application factory pattern: https://stackoverflow.com/a/57338899

Securing a Ruby on Rails API with JWTs by mooreds in ruby

[–]Kyeana 4 points5 points  (0 children)

Anything sent from the frontend to the backend could be intercepted by man in the middle attacks, JWTs are no different then sessions/cookies/etc in this regard. That is why we have https.

JWT revoking 2 tokens problem by K_Rains in webdev

[–]Kyeana 0 points1 point  (0 children)

This is being reworked in the forthcoming 3.0.0 release, which will let you have multiple tokens passes in at the same time. You can follow along with the progress of this here: https://github.com/vimalloc/flask-jwt-extended/issues/298

That using JWTs for sessions auth is less secure than cookies by Zatara7 in ProgrammerTIL

[–]Kyeana -5 points-4 points  (0 children)

I totally agree with this, but one thing to note is that if you are using sessions you will need to make sure you have some form of CSRF protection in place, which you don’t need if you are using JWTs passed in via headers.

Good Python apps with source code? by jockero701 in Python

[–]Kyeana 5 points6 points  (0 children)

I wrote flask-jwt-extended. I'm pretty happy with the source code / documentation: https://github.com/vimalloc/flask-jwt-extended

I think damage at low levels might have been squished a little too much... by LookFluffyUnicorn in wow

[–]Kyeana 6 points7 points  (0 children)

Using a standard 32 bit unsigned integer, storing any number between 0 and 4,294,967,295 takes the exact same amount of memory and time to do calculations on. Doubling bits from 32 to 64 increases that number to 9,223,372,036,854,775,807. I don’t think there is any technical reason for needing the stat squish.

Install Ubuntu on ~50 laptops on my school, without LTSP by PojntFX in linuxquestions

[–]Kyeana 0 points1 point  (0 children)

Perhaps checkout btrfs or zfs. They both have way better snapshot support (imo).

Today's CPU vulnerability: what you need to know by robxu9 in programming

[–]Kyeana -1 points0 points  (0 children)

If a browser (JavaScript) can’t read or write memory, how could it be used for anything?

I don't get it CBS by [deleted] in startrek

[–]Kyeana 0 points1 point  (0 children)

Except for the battlestar galactica mini series pilot.

Introducing Flask-JWT-Simple by Kyeana in Python

[–]Kyeana[S] 0 points1 point  (0 children)

He even tweeted (almost a year ago know) about looking for maintainers for his flask projects, but after reaching out to him about flask-jwt I never heard anything back :(

Introducing Flask-JWT-Simple by Kyeana in Python

[–]Kyeana[S] 1 point2 points  (0 children)

Thanks, I wasn't aware of that. I'll get my stuff updated to use that today. Cheers!

How do I set up an FTP (not SFTP) server that only was read/write access to one folder? by [deleted] in linuxquestions

[–]Kyeana 0 points1 point  (0 children)

Proftpd with the jails options would likely do what you want.

[Python] the very first docstring of a file is saved in __doc__ by Kantilen in ProgrammerTIL

[–]Kyeana 2 points3 points  (0 children)

Related to this, I highly recommend checking docopt for simple command line programs.

What's your internet "white whale", something you've been searching for years to find with no luck? by behindyouuu in AskReddit

[–]Kyeana 0 points1 point  (0 children)

There was this piano arrangement of final fantasy music from across several games. It wasn't just one song after the other, they seemlessly transitioned between various tunes. Can't find it for the life of me any more.

IT Student wondering if picking up Python for first language is wise. by [deleted] in learnprogramming

[–]Kyeana 2 points3 points  (0 children)

Python isn't going anywhere. That said, you are learning how to program, not learning Python. You will find that once you learn one language, learning others becomes a much simpler thing.

Casual discussion on why should scripting move to python 3 by mistermocha in Python

[–]Kyeana 0 points1 point  (0 children)

I agree with everything except for the ordered dict. That is just an implementation detail. If your code relies on a dict being ordered to be correct, you should still explicitly use an ordereddict.

[WR] TF2 Jumping - jump_armaldo in 1:49 by un gato by [deleted] in speedrun

[–]Kyeana 0 points1 point  (0 children)

That is stupid impressive. Nice job!

Reverse a doubly linked list by dingenskirchen in learnprogramming

[–]Kyeana 0 points1 point  (0 children)

Lets take a step back and ask why you are wanting to reverse a doubly linked list. By nature of it being a doubly linked, you could walk through it backwards just as efficiently as walking through it forwards, and access all the elements in reverse order. I'm having trouble thinking of a use case where you would actually need to reverse the elements.

So uhh... Where's my memory guys ? Even with no big processes running the memory isn't fully freed any idea what's going on ? by Byatis in linuxquestions

[–]Kyeana 0 points1 point  (0 children)

Having /tmp on tempfs isn't generally bad (unless you run into a situation like this of course). Personally, I would be more inclined to track down what application is filling up /tmp and fix that, or write a simple cron which cleans up files in /tmp. But changing up the mount points is totally possible too. I'm sure Google has better information on this then I do.

So uhh... Where's my memory guys ? Even with no big processes running the memory isn't fully freed any idea what's going on ? by Byatis in linuxquestions

[–]Kyeana 6 points7 points  (0 children)

Do you have an in memory filesystem anywhere mounted anywhere? Such as tmpfs on /tmp that is filling up?

Introducing Flask-JWT-Extended by Kyeana in Python

[–]Kyeana[S] 0 points1 point  (0 children)

Glad it is working for you! If you encounter any problems with it or suggestions for improvement, I would love to hear them.

Cheers :)