Project

General

Profile

Bug #46548

mgr/dashboard: Unable to create user with non-ASCII chars using CLI

Added by Ricardo Marques about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Component - Users & Roles
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When I try to create a user with `Umlauts` using dashboard CLI, I see the following error:

# ceph dashboard ac-user-create mööö adminpassword
Invalid command: invalid chars ö in mööö
dashboard ac-user-create <username> [<password>] [<rolename>] [<name>] [<email>] [--enabled] [--force-password] [<pwd_expiration_date:int>] [--pwd-update-required] :  Create a user
Error EINVAL: invalid command

But if I use the WebUI, I can create that user:

create_user_1.png View (14.8 KB) Ricardo Marques, 07/15/2020 12:38 PM

create_user_2.png View (12.5 KB) Ricardo Marques, 07/15/2020 12:39 PM

History

#1 Updated by Lenz Grimmer about 3 years ago

  • Assignee set to Tatjana Dehler

#2 Updated by Tatjana Dehler almost 3 years ago

The responsible methods to create users in the dashboard are:

The difference between these two methods (and input parameters) is that CephStrings are checked for invalid chars (https://github.com/ceph/ceph/blob/master/src/pybind/ceph_argparse.py#L240) and "normal" strings not.
The question is now if we should either:
  • Disallow the invalid chars for the REST-API (my preference)
  • Allow invalid chars for CephStrings

#3 Updated by Tatjana Dehler almost 3 years ago

  • Status changed from New to Resolved
  • Pull request ID set to 37740

#4 Updated by Ernesto Puerta almost 3 years ago

  • Status changed from Resolved to Closed

#5 Updated by Ernesto Puerta over 2 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 150 to Component - Users & Roles

Also available in: Atom PDF