Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's no XSS protection whatsoever #12

Open
plq opened this issue Nov 18, 2012 · 1 comment
Open

There's no XSS protection whatsoever #12

plq opened this issue Nov 18, 2012 · 1 comment
Labels

Comments

@plq
Copy link
Member

plq commented Nov 18, 2012

    @rpc(Unicode, Unicode, Unicode, Unicode, File, Unicode, Unicode, Unicode,
         Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
         Unicode, Unicode, String, _patterns=[HttpPattern("/",verb="POST")])
    def register(ctx, name, license, author, home_page, content, comment,
            download_url, platform, description, metadata_version, author_email,
            md5_digest, filetype, pyversion, summary, version, protcol_version):

The type declarations in the above block must be revised with max_len and pattern constraints.

Regexes and other validation code could be stolen from: https://bitbucket.org/loewis/pypi/src/7ffa1f091b87dd58eb3770abc6af30ec37943ba1/verlib.py?at=default

One could define, e.g.:

PackageName = Unicode(64, pattern='[a-zA-Z_][0-9A-Za-z_]*')

And use it in database declarations, rpc decorators and ComplexModel subclasses.

@plq
Copy link
Member Author

plq commented Dec 27, 2012

unless we do this, it's won't be possible to run spynepi open to the public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant