Project

General

Profile

Segnalazione #294

Problema con password utente e caratteri speciali

Added by Christopher R. Gabriel almost 7 years ago. Updated over 6 years ago.

Status:
Chiuso
Priority:
Normale
Start date:
06/08/2017
Due date:
% Done:

0%

Estimated time:

Description

Se un utente ha come password qualcosa contenente caratteri speciali, tipo "è", poi l'utente non riesce ad autenticarsi sul proxy.

Verifica il passaggio di credenziali verso squid, o in alternativa valutare una limitazione ai caratteri non ascii7 come valore di password tramite PAM e Octonet.

Rilevato nella versione precedente di FUSS, prima verificare che si riproduca anche con la versione 8.x


Related issues

Related to octofussd - Segnalazione #311: Il cambio di password con caratteri non-ascii non salva il valore correttoChiuso06/13/2017

Actions

Associated revisions

Revision 69fc6e9f (diff)
Added by Simone Piccardi almost 7 years ago

Adding forced latin1 -> utf8 conversion for LDAP helper use.
refs: #294

History

#1

Updated by Christopher R. Gabriel almost 7 years ago

  • Assignee set to Simone Piccardi
#2

Updated by Simone Piccardi almost 7 years ago

  • Assignee changed from Simone Piccardi to Christopher R. Gabriel

Dalla documentazione di squid:

#
#    "utf8" on|off
#    HTTP uses iso-latin-1 as character set, while some authentication
#    backends such as LDAP expects UTF-8. If this is set to on Squid will
#    translate the HTTP iso-latin-1 charset to UTF-8 before sending the
#    username & password to the helper.

aggiungendo a /etc/squid3/squid.conf la riga:

auth_param basic utf8 on

l'autenticazione funziona anche con password contenenti lettere accentate tipo "è" (verifica manuale puntando firefox al proxy con la configurazione cambiata a mano), la modifica al fuss-server è in 69fc6e9.

#3

Updated by Christopher R. Gabriel almost 7 years ago

  • Assignee changed from Christopher R. Gabriel to Simone Piccardi

Bene, se e' gia' nel repository fate pure il pacchetto.

#4

Updated by Simone Piccardi almost 7 years ago

  • Assignee changed from Simone Piccardi to Elena Grandi

Elena, lo passo a te per la realizzazione della nuova versione del pacchetto con le altre tue modifiche in attesa.

#5

Updated by Elena Grandi almost 7 years ago

  • Assignee changed from Elena Grandi to Simone Piccardi

Ho verificato la versione attuale di fuss-server su un server locale esistente: in /etc/squid3/squid.conf viene effettivamente aggiunta la riga in questione, ma ho fatto prove con una password contenente il carattere ü e l'auth continua a non funzionare

#6

Updated by Simone Piccardi almost 7 years ago

  • Status changed from Nuovo to In elaborazione
  • Assignee changed from Simone Piccardi to Elena Grandi

Le mie verifiche sono state per password con caratteri come è ed ü che con opzione disattiva non vengono riconosciute e con opzione attiva invece funzionano.

Ho provato con ŭ (ottenuta come compose u u) e con questa non funziona, sospetto un problema di codifica a questo punto nel passaggio della password ad LDAP (impostazione fatta nel mio caso con smbldap-passwd).

#7

Updated by Elena Grandi almost 7 years ago

  • Related to Segnalazione #311: Il cambio di password con caratteri non-ascii non salva il valore corretto added
#8

Updated by Elena Grandi almost 7 years ago

  • Assignee changed from Elena Grandi to Christopher R. Gabriel

Le modifiche presenti sul fuss-server sono incluse in fuss-server 8.0.14-1, appena pubblicata sul repo.

Non ho verificato che risolvessero anche da me il problema.

#9

Updated by Christopher R. Gabriel almost 7 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee changed from Christopher R. Gabriel to Simone Piccardi

Riassegno a Simone per chiusura, visto che la verifiche le aveva fatte lui.

#10

Updated by Christopher R. Gabriel over 6 years ago

Provato con 'ciào' come password, non risolve.

#11

Updated by Simone Piccardi over 6 years ago

  • Assignee changed from Simone Piccardi to Christopher R. Gabriel

Ho installato l'ultima versione (fuss-server-jessie-amd64-201706211104.iso) e una volta creato il fuss-server ho fatto un test (firefox nella macchina virtuale) mettendo 127.0.0.1:8080 come proxy.

Ho creato l'utente prova2 con password pìppò usando gli smbldap-tools (smbldap-useradd e smbldap-passwd) e mi sono regolarmente autenticato sia al login (con su da un altro utente ordinario) che nel proxy.

Ho provato a creare da octonet l'utente prova3 con password ciào ma ho ottenuto il seguente errore nel browser:

ValueError: 'charmap' codec can't encode character '\xc0' in position 2: character maps to <undefined>

Questo l'errore in /var/log/octofuss/octofussd.log.

2017-06-26T19:33:30+0200 [stderr#error] Traceback (most recent call last):
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/xmlrpc.py", line 155, in _wrap_call
2017-06-26T19:33:30+0200 [stderr#error]     res = callable(*args)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/tree.py", line 62, in set
2017-06-26T19:33:30+0200 [stderr#error]     return self.lset(_tolist(path), value, **kw)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/tree.py", line 235, in lset
2017-06-26T19:33:30+0200 [stderr#error]     return tree.lset(path[1:], value, **kw)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/tree.py", line 235, in lset
2017-06-26T19:33:30+0200 [stderr#error]     return tree.lset(path[1:], value, **kw)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/tree.py", line 556, in lset
2017-06-26T19:33:30+0200 [stderr#error]     return el.lset(path[1:], value)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/octofuss/tree.py", line 406, in lset
2017-06-26T19:33:30+0200 [stderr#error]     if sub: return sub.__set__(self, value)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/share/octofussd/plugins/usersplugin/common.py", line 399, in setPassword
2017-06-26T19:33:30+0200 [stderr#error]     self.data.sambaLMPassword = passlib.hash.lmhash.encrypt(value)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/passlib/utils/handlers.py", line 558, in encrypt
2017-06-26T19:33:30+0200 [stderr#error]     self.checksum = self._calc_checksum(secret)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/passlib/handlers/windows.py", line 62, in _calc_checksum
2017-06-26T19:33:30+0200 [stderr#error]     return hexlify(self.raw(secret, self.encoding)).decode("ascii")
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3/dist-packages/passlib/handlers/windows.py", line 92, in raw
2017-06-26T19:33:30+0200 [stderr#error]     secret = secret.upper().encode(encoding)
2017-06-26T19:33:30+0200 [stderr#error]   File "/usr/lib/python3.4/encodings/cp437.py", line 12, in encode
2017-06-26T19:33:30+0200 [stderr#error]     return codecs.charmap_encode(input,errors,encoding_map)
2017-06-26T19:33:30+0200 [stderr#error] UnicodeEncodeError: 'charmap' codec can't encode character '\xc0' in position 2: character maps to <undefined>
2017-06-26T19:33:30+0200 [stdout#info] Exception <class 'UnicodeEncodeError'> is not whitelisted
2017-06-26T19:33:30+0200 [stdout#info] Exception <class 'UnicodeError'> is not whitelisted

Ho cambiato password all'utente precedente sempre con smbldap-passwd (usando ciào), e di nuovo mi sono autenticato correttamente sul proxy che sulla console (login e su da utente diverso).

Tutte password sono state immesse componendole sul terminale e poi passandole ai comandi, ed a firefox, con un taglia e incolla via pulsante centrale del mouse.

#12

Updated by Christopher R. Gabriel over 6 years ago

  • Assignee changed from Christopher R. Gabriel to Simone Piccardi

Pubblicato nuovo octofussd che risolve il problema, vedi #311

#13

Updated by Simone Piccardi over 6 years ago

  • Status changed from Commenti to Chiuso

Confermo il corretto funzionamento con le versioni correnti dei pacchetti, octonet non da più errori ed l'utente viene creato con la password indicata.

Also available in: Atom PDF