Hi list!
We have been using kallithea for quite a while now and are very happy with it.
But recently I have upgraded our two instances from 3.x to 4.1.
Upgrade went fine and all seems to work ok except fort this;
We have our users in Active Directory (server 2012) and for those users with
non ascii chars in their name (åäö in our case since we are in Sweden) this
happens when they try to login:
2019-07-30 16:02:55.021 ERROR [kallithea.model.user] Traceback (most recent
call last):
File
"/opt/kallithea/.local/lib/python2.7/site-packages/kallithea/model/user.py",
line 169, in create_or_update
Session().flush() # make database assign new_user.user_id
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2446, in flush
self._flush(objects)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2584, in _flush
transaction.rollback(_capture_exception=True)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py",
line 67, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 2544, in _flush
flush_context.execute()
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 416, in execute
rec.execute(self)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py",
line 583, in execute
uow,
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 245, in save_obj
insert,
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py",
line 1116, in _emit_insert_statements
statement, params
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 980, in execute
return meth(self, multiparams, params)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py",
line 273, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 1099, in _execute_clauseelement
distilled_params,
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 1240, in _execute_context
e, statement, parameters, cursor, context
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 1458, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/util/compat.py",
line 296, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
line 1236, in _execute_context
cursor, statement, parameters, context
File
"/opt/kallithea/.local/lib/python2.7/site-packages/sqlalchemy/engine/default.py",
line 536, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (sqlite3.ProgrammingError) You must not use 8-bit bytestrings
unless you use a text_factory that can interpret 8-bit bytestrings (like
text_factory = str). It is highly recommended that you instead just switch your
application to Unicode strings. [SQL: u'INSERT INTO users (username, password,
active, admin, firstname, lastname, email, last_login, extern_type,
extern_name, api_key, inherit_default_permissions, created_on, user_data)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (u'omannen',
'*masked*', 0, 0, u'\xf6mannen', u'man', 'omannen@*masked*', None, 'ldap',
'CN=\xc3\xb6mannen man,OU=*masked*', '*masked*', 1, '2019-07-30
16:02:55.016018', None)] (Background on this error at:
http://sqlalche.me/e/f405)
This is an example with a test user called "Ömannen man". It worked fine before
upgrade and i I rename the user in AD to not have any ÅÄÖ login works...
Has anyone seen this issue or is it something in my upgrade/setup that is
causing this?
Os is centos 7.6
locale :
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Best regards
------------------
Carl Boberg
Sysadmin / Operations
www.unifaun.com<http://www.unifaun.com>
_______________________________________________
kallithea-general mailing list
[email protected]
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general