Git Product home page Git Product logo

gae_blog's People

Contributors

bdoms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gae_blog's Issues

Move JavaScript into External Files

It's getting to the point where there's too much to justify keeping it inline. Not having a front end framework is nice, but the blog-specific stuff can still be moved out into a single file.

Have JS Cache Images

Right now whenever a new page of images is requested when editing a post the JS always goes to the server. It would be pretty easy to just build an array of the images to use so the user could navigate pages quickly.

Control Showing Number of Comments

The column for number of comments on the posts page in the admin section should be hidden if comments are not turned on for the blog.

Summaries should be stripped of style and script tags

There's already some HTML purification going on there, but it needs a bit more. I think the tags themselves are gone, but everything in between them actually stays - which is good for h3 or p, but bad for style or script.

Wrap request.get in a try block

If we receive a POST with data in fields that does not encode to UTF-8 (therefore including ASCII) then this will cause an error. Of course that wouldn't happen normally as browsers would submit it in UTF-8, but spammers will often post directly to the URL by some other means. Here's a real example of a traceback from a live site:

'utf8' codec can't decode byte 0xa5 in position 0: invalid start byte
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~disciplinesystem/1.369627811828057272/lib/gae_blog/controllers/post.py", line 37, in post
name = self.request.get("name")
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 175, in get
param_value = self.get_all(argument_name)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 212, in get_all
param_value = self.params.getall(argument_name)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webob-1.1.1/webob/multidict.py", line 327, in getall
return map(self._decode_value, self.multi.getall(self._encode_key(key)))
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webob-1.1.1/webob/multidict.py", line 301, in _decode_value
value = value.decode(self.encoding, self.errors)
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa5 in position 0: invalid start byte

Create a Contact Page

It should just be a drop down to select either "everyone" or a specific author of the blog, a field for an email address, and a text area for the body. These should then be used to forward the body as an email from the address to the author's (or everyone's) email.

Add Spam Honeypot

Most of the spam seems to be automated, so adding in a honeypot (to both comments and the contact form) would probably solve most of that. First try would just be an extra field that's invisible to the user. If that doesn't work, we try making it seem like it's visible (i.e. jquery's .is:visible would pass) but it still isn't actually visible to a human user (camouflage). If that doesn't work then a javascript AJAX call to get a hash to include at the time of submit would help defeat bots without JS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.