﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
801	[PATCH] OsmConnection assumes ASCII strings for authentication	danilo@…	framm	"Being the i18n guy that I am, I push all the technologies to their max, and I chose ""Данило"" (Cyrillic Danilo) for my username on OpenStreetMap.

This caused problems with JOSM when authenticating (for HTTP Basic Authentication), because Base64.encode used assumed that a string it was passed was consisted of 8-bit safe Unicode characters, however Cyrillic is outside this range (0x400–0x47f).

To fix this, I downloaded JOSM from SVN and first CharsetEncoder.encode()d the username and password, and passed that to an almost identical implementation of Base64.encode() but which takes ByteBuffer as a parameter.

My Java coding is certainly lacking (I've only rarely do some), and even stylistically, I could not figure out if there was any coding standard in use (spaces and tabs are used interchangeably in the sourcecode). Also, if this was code I would be maintaining, I'd remove the Base64.encode(String) method, because that one is easily misused (maybe make it Base64.encode(String, String charset) instead?)

However, the attached patch made it possible for me to upload changes to OSM server.

This bug is a ""blocker"" for me, but I've left it as the default ""major"" priority, because I suspect you determine priority based on other criteria as well."	defect	closed	major		Core	latest	fixed	authentication, utf-8	
