mirror of https://github.com/zlatinb/muwire
make sure the persona reported by the browser matches
parent
5de8a51e47
commit
3b2e1cf98c
|
@ -333,8 +333,11 @@ class ConnectionAcceptor {
|
|||
|
||||
Persona browser = null
|
||||
Map<String,String> headers = DataUtil.readAllHeaders(dis);
|
||||
if (headers.containsKey('Persona'))
|
||||
if (headers.containsKey('Persona')) {
|
||||
browser = new Persona(new ByteArrayInputStream(Base64.decode(headers['Persona'])))
|
||||
if (browser.destination != e.destination)
|
||||
throw new IOException("browser persona mismatch")
|
||||
}
|
||||
|
||||
OutputStream os = e.getOutputStream()
|
||||
if (!settings.browseFiles) {
|
||||
|
|
Loading…
Reference in New Issue