Illegal path attribute.. HTTPS

L

Lucius1972

Neues Mitglied
0
Hallo Leute,

Momentan arbeite Ich an einer App um mich ueber eine HTTPS Seite einzuloggen.
Dabei werden alle Zerificate erlaubt, Ich bekommen aber folgende Fehler im Logcat:
HTML:
WARN/ResponseProcessCookies(4911): Cookie rejected: "BasicClientCookie[version=0,name=ObFormLoginCookie,domain=www.xxxx.com,path=/web/restricted/form?formelement=512663,expiry=null]". Illegal path attribute "/web/restricted/form?formelement=512663". Path of origin: "/web/restricted/form/formelement=512663"

Kan mich da bitte Jemand weiterhelfen um dies zu loesen?
Danke euch.

Mein Code:
Code:
[SIZE=2]DefaultHttpClient client = [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]; [/SIZE][/LEFT]
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]try[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] { [/SIZE][/LEFT]
 
 
 
[LEFT][SIZE=2]KeyStore trustStore = KeyStore.[I]getInstance[/I](KeyStore.[I]getDefaultType[/I]()); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]trustStore.load([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]); [/SIZE][/LEFT]
 
 
 
 
 
[LEFT][SIZE=2]SSLSocketFactory sf = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] CustomSSLSocketFactory(trustStore); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]sf.setHostnameVerifier(SSLSocketFactory.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]ALLOW_ALL_HOSTNAME_VERIFIER[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE][/LEFT]
 
 
 
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Setting up parameters [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpParams params = [/SIZE][/LEFT]
 
 
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] BasicHttpParams(); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpProtocolParams.[I]setVersion[/I](params, HttpVersion.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]HTTP_1_1[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpProtocolParams.[I]setContentCharset[/I](params, [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"utf-8"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]params.setBooleanParameter([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"http.protocol.expect-continue"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]false[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]); [/SIZE][/LEFT]
 
 
 
 
 
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Setting timeout [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpConnectionParams.[I]setConnectionTimeout[/I](params, 5000); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpConnectionParams.[I]setSoTimeout[/I](params, 5000); [/SIZE][/LEFT]
 
 
 
 
 
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Registering schemes for both HTTP and HTTPS [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]SchemeRegistry registry = [/SIZE][/LEFT]
 
 
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] SchemeRegistry(); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]registry.register([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Scheme([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"http"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], PlainSocketFactory.[I]getSocketFactory[/I](), 80)); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]registry.register([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Scheme([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"https"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], sf, 443)); [/SIZE][/LEFT]
 
 
 
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Creating thread safe client connection manager [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]ClientConnectionManager ccm = [/SIZE][/LEFT]
 
 
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] ThreadSafeClientConnManager(params, registry); [/SIZE][/LEFT]
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Creating HTTP client [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]client = [/SIZE][/LEFT]
 
 
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] DefaultHttpClient(ccm, params); [/SIZE][/LEFT]
 
 
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Registering user name and password for authentication [/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
[LEFT][SIZE=2]client.getCredentialsProvider().setCredentials( [/SIZE][/LEFT]
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] AuthScope([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]null[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], -1), [/SIZE]

[SIZE=2]// Input user and password[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] UsernamePasswordCredentials(username, password)); [/SIZE][/LEFT]
[/LEFT]

 
 
 
 
 
 
 
 
[LEFT][SIZE=2]} [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]catch[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] (Exception e) { [/SIZE][/LEFT]
 
[LEFT][SIZE=2]client = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] DefaultHttpClient(); [/SIZE][/LEFT]
 
[LEFT][SIZE=2]} [/SIZE][/LEFT]
 
 
 
 
 
 
 
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]final[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] String url = [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"https://www.xxxx.com/web/restricted/form/formelement=512663"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]; [/SIZE][/LEFT]
 
[LEFT][SIZE=2]HttpPost httpPost = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] HttpPost(url); [/SIZE][/LEFT]
 
 
 
 
 
 
[LEFT][SIZE=2]HttpResponse response = client.execute(httpPost);[/SIZE][/LEFT]
 
[LEFT][SIZE=2]Log.[I]w[/I]([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Response "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Status line : "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]+ response.toString()); [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// 200 if successfully logged in[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
 
Schau dir mal den Pfad deines Elements und den Pfad des Cookies an. Die stimmen nicht überein und daher wird aus Sicherheitsgründen die Warnung geworfen:

"/web/restricted/form?formelement=512663" (value)
und
"/web/restricted/form/formelement=512663" (Path of origin)


RFC 2109 schrieb:
4.3.2 Rejecting Cookies

To prevent possible security or privacy violations, a user agent
rejects a cookie (shall not store its information) if any of the
following is true:

* The value for the Path attribute is not a prefix of the request-
URI.
...



Ich vermute auch mal, dass du hier ein ? statt / setzen wolltest, oder?
-> final String url = "https://www.xxxx.com/web/restricted/form/formelement=512663";
 
Ist da keiner der weiterhelfen kann?
Vielleicht uebersehe Ich ja was..
 

Ähnliche Themen

C
Antworten
8
Aufrufe
1.182
cyb0rg
C
Jaiel
Antworten
7
Aufrufe
1.316
swa00
swa00
Zurück
Oben Unten