Comments (30)
yes! thank you
from espasyncwebserver.
I can confirm issue with windows 7 / IE 11
No problem so far with chrome/safari/firefox
from espasyncwebserver.
@luc-github can you grab the actual request? I might have an idea...
from espasyncwebserver.
Sure, what can I do to help ?
from espasyncwebserver.
does internet explorer have some sort of inspector? I need to see the request headers
something like:
if not maybe you can print here before _parseLine();
and see what comes out
from espasyncwebserver.
Sorry my browser is in french - this one is Windows 10/IE11
here before I type admin/admin:
and after:
is it what you expected ?
from espasyncwebserver.
hm it seems to use WWW-Authenticate header instead
from espasyncwebserver.
hm actually no. there should be another request from the browser asking you for user/pass. is it not asking you at all?
from espasyncwebserver.
nope there is the failed and the new one:
en attente
means waiting
from espasyncwebserver.
http://stackoverflow.com/questions/2192811/digest-authentication-not-working-on-ie8-firefox-and-chrome-are-fine
see this link. maybe propagates through the versions
from espasyncwebserver.
not sure it helps
from espasyncwebserver.
https://jira.mongodb.org/browse/SERVER-5890
also here saying that there is a new line in the header? Maybe using the print in the lib where I asked could tell us that
from espasyncwebserver.
sure what command do you want me to add before _parseLine(); to print the request ?
print _temp ?
from espasyncwebserver.
Serial.println(_temp);
from espasyncwebserver.
here it is, I typed admin/admin twice
connected with NETGEAR_2GEXT_OFFICE, channel 3
dhcp client start...
ip:192.168.1.18,mask:255.255.255.0,gw:192.168.1.1
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.6,zh-Hant-TW;q=0.5,zh-Hant;q=0.4,zh-Hans-CN;q=0.3,zh-Hans;q=0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.6,zh-Hant-TW;q=0.5,zh-Hant;q=0.4,zh-Hans-CN;q=0.3,zh-Hans;q=0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
Authorization: Digest username="admin",realm="asyncesp",nonce="96448e594139537eb3a91b328faf5ac3",uri="/edit",cnonce="a461c687ff395d4f010be32286e20657",nc=00000001,response="cc2917706af94cf3a1f999cc0c1a9b75",qop="auth",opaque="badf84932bd8862f56479ba0acd1a8cb"
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.6,zh-Hant-TW;q=0.5,zh-Hant;q=0.4,zh-Hans-CN;q=0.3,zh-Hans;q=0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
Authorization: Digest username="admin",realm="asyncesp",nonce="f73a8231a3977372dbadc3684f234d5f",uri="/edit",cnonce="399ee6b5da255da7c7c47bb65aad44f5",nc=00000001,response="d7dd556917e33e8399661fd19869799d",qop="auth",opaque="8dcbfd7d081a680b3869014707977d45"
from espasyncwebserver.
aaah
here and here is checked for comma and space after that and IE does not send space. Should be checked just for comma and avLine should be trimmed.
from espasyncwebserver.
Sorry for delay - I was little bit busy.
I did the modifications (remove space, left comma and add trim)
but no success under IE and still ok for firefox :
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: fr-FR
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP08; MAAU; NP08; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
Authorization: Digest username="admin",realm="asyncesp",nonce="cdf8fdae15d635fdd29b533353b8f60d",uri="/edit",cnonce="434d8a0f3effdcc0893f953757e829db",nc=00000001,response="e408aa2f3d35a20bb85311227e465580",qop="auth",opaque="fa15b74913db5b22c512ca11ea2860d8"
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: fr-FR
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP08; MAAU; NP08; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
Authorization: Digest username="admin",realm="asyncesp",nonce="873cb98eebd8e5d660af45790e06b95b",uri="/edit",cnonce="6bac3f6e5ab2840e38561063c076572e",nc=00000001,response="2b2a017c1b1115238e5de0fb49001fff",qop="auth",opaque="2424b6555db609aa683f83e56e0d28f7"
from espasyncwebserver.
can you print avName and value here maybe space was not trimmed?
from espasyncwebserver.
Ok I print values between >
and <
to see if has space, and add trim to check but seems not the issue:
GET /edit HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: fr-FR
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP08; MAAU; NP08; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 192.168.1.18
Connection: Keep-Alive
Authorization: Digest username="admin",realm="asyncesp",nonce="8a7b69977ed9eb05e0cb9bc1709156ad",uri="/edit",cnonce="d9e106770d7f2892533b47eff6d5287a",nc=00000001,response="3404e4d0437c78b4a1f4b4bc5c543485",qop="auth",opaque="b7e0872e6d0171b0c718dff7cdb3df33"
varName:>username<
avLine:>"admin"<
varName:>ealm<
avLine:>"asyncesp"<
varName:>once<
avLine:>"8a7b69977ed9eb05e0cb9bc1709156ad"<
varName:>ri<
avLine:>"/edit"<
varName:>nonce<
avLine:>"d9e106770d7f2892533b47eff6d5287a"<
varName:>c<
avLine:>00000001<
varName:>esponse<
avLine:>"3404e4d0437c78b4a1f4b4bc5c543485"<
varName:>op<
avLine:>"auth"<
varName:>paque<
avLine:>"b7e0872e6d0171b0c718dff7cdb3df33"<
from espasyncwebserver.
not good! cuts one letter.
what is your code change in there from before?
from espasyncwebserver.
like, how are you trimming avLine?
from espasyncwebserver.
well normal way I think same as you :
String varName = avLine.substring(0, eqSign);
Serial.print("varName:>");
Serial.print(varName);
Serial.println("<");
avLine = avLine.substring(eqSign + 1);
Serial.print("avLine:>");
Serial.print(avLine);
Serial.println("<");
avLine.trim();
from espasyncwebserver.
and before just remove space and add trim as you said:
int nextBreak = myHeader.indexOf(",");
if(nextBreak < 0){
//os_printf("AUTH FAIL: no variables\n");
return false;
}
String myUsername = String();
String myRealm = String();
String myNonce = String();
String myUri = String();
String myResponse = String();
String myQop = String();
String myNc = String();
String myCnonce = String();
myHeader += ", ";
do {
String avLine = myHeader.substring(0, nextBreak);
avLine.trim();
myHeader = myHeader.substring(nextBreak+2);
nextBreak = myHeader.indexOf(",");
from espasyncwebserver.
myHeader = myHeader.substring(nextBreak+2); << change to +1
from espasyncwebserver.
you found it 😄
Now it is ok - tested on IE and firefox, and chrome and Android
thanks a lot for your help
you are the best ^_^
from espasyncwebserver.
I redo clean one:
first trim is enough - no need the second one
so fix is :
removing space L135/L154, trim avLine after line 152 and L153 change to:
myHeader = myHeader.substring(nextBreak+1);
from espasyncwebserver.
done :) 49d5a24
from espasyncwebserver.
Thank you ^_^
from espasyncwebserver.
thanks @luc-github for your help!
from espasyncwebserver.
my pleasure ^_^
from espasyncwebserver.
Related Issues (20)
- Send content with beginChunkedResponse
- Question: is it possible to replicate AsyncWebSocket with WebServer in arduino-esp32 v3.0.0 ? HOT 4
- AsyncWebServer Questions HOT 6
- Images won't load randomly
- Compiling issues HOT 8
- I Can't make the web explorer to offer to save credentials
- Change bool AsyncStaticWebHandler::canHandle to use exact match instead of String::startsWith(_uri)
- small ddos (press F5) crash: async_tcp ....watchdog got triggered HOT 2
- Compilation Error for Newer ESP32 HOT 3
- possible memory leak at send_p?
- Forwarding Webserver with websockets HOT 2
- Get new client ID at every refresh :( HOT 1
- Refusing connection when making httpGet request with mDNS
- Problem resolved ? "Arduino\libraries\ESPAsyncWebSrv\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?" HOT 10
- does not compile with ESP32C3
- ESP8266: Compilation error: invalid conversion from 'const AsyncWebParameter*' to 'AsyncWebParameter*' [-fpermissive] HOT 1
- IDF 5 Coexistence support HOT 3
- It is possible Increase buffer size for rx data by websocket?
- Cant set Table or Cell width % because of template processing HOT 2
- Web server hangs up HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espasyncwebserver.