Comments (3)
Hi Alfonso,
Control Center admin users are limited to lower case letters and numbers:
https://github.com/gecos-team/gecoscc-ui/blob/master/gecoscc/models.py
class LowerAlphaNumeric(object):
err_msg = _('Only lowercase letters or numbers')
regex = re.compile(r'^([a-z]|[0-9])*$')
def call(self, node, value):
if not self.regex.match(value):
node.raise_invalid(self.err_msg)
Chef usernames are sanitized by replacing the dots by underscores:
https://github.com/chef/chef-server-webui/blob/master/app/models/user.rb
def name=(n)
@name = n.gsub(/./, '_')
end
Also Chef saves the user via the REST API so the username must create a proper URI, so it must be limited to [ ALPHA / DIGIT / "-" / "_" / "~" ]
Maybe the sanitize function must force the username to match the following regular expression: [A-Za-z0-9-_~]
Do you think that "admin usernames " and "workstation usernames" must be sanitized by using this regular expression?
from gecoscc-ui.
Yes, it looks a pretty straight forward solution, although I think that regexp must be implemented in our Control Center before saving/retrieving admin useres to/from Chef.
from gecoscc-ui.
Testing with different usernames in the Chef Server administration area I noticed that the usernames must be in lower case and the "~" characters also is forbidden.
To the final regular expression to match is [a-z0-9-_]
from gecoscc-ui.
Related Issues (20)
- New comments field for workstations and users
- Reorder basic information in workstation card
- Platform parameters should be defined in a web interface
- Error accessing global Settings
- Deleted objects can be assigned HOT 1
- Policies do not merge as expected HOT 1
- Moving objects other than computers/users
- Log & status rest api HOT 5
- Users do not dissociate from workstations
- Visibility errors HOT 3
- Users and Workstation do not disassociate from groups
- Software profiles out of scope
- Concurrency problem HOT 1
- Import printers
- Recalculating policies HOT 1
- Policy view of a workstation HOT 1
- Error when trying to execute an update HOT 2
- Error in statistics in a new installed system
- Error when recalculating policies if the node has no inheritance information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gecoscc-ui.