Code Monkey home page Code Monkey logo

aos-wlan-ansible-role's People

Contributors

jayp193 avatar karthikeyan-dhandapani avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aos-wlan-ansible-role's Issues

Issue with non-ASCII double quotes

SyntaxError: Non-ASCII character '\xe2
Error with Ansible version 2.8.4.

imp.load_module('__main__', mod, module, MOD_DESC)

File "/var/folders/jq/j3sb9jw54tq9pf43mp1mxdp80000gp/T/ansible_aos_api_config_payload_yuu5zX/main.py", line 111
SyntaxError: Non-ASCII character '\xe2' in file /var/folders/jq/j3sb9jw54tq9pf43mp1mxdp80000gp/T/ansible_aos_api_config_payload_yuu5zX/main.py on line 112, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

- $in (pattern matches the filter value. E.g., if filter says “ap”,

“default-ap” and “ap-grp1” will both match)

authentication fails when password contains & character

Authentications fails when the username or password contains a special character like &

Probably caused because the login method of class HttpApi in aos.py does not escape username and password:

path = '/v1/api/login?username='+username+'&password='+password

Possible solution:

import urllib.parse

class HttpApi(HttpApiBase):
    def __init__(self, *args, **kwargs):
        super(HttpApi, self).__init__(*args, **kwargs)

    def login(self, username, password):
        path = '/v1/api/login?username='+urllib.parse.quote(str(username), safe='')+'&password='+urllib.parse.quote(str(password), safe='')
        method = 'GET'
        self.send_request(data=None, path=path, method=method)

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.