Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank chars query parsing from mini_httpd-1.30_170 #86

Closed
f54rog opened this issue Oct 19, 2021 · 11 comments
Closed

Blank chars query parsing from mini_httpd-1.30_170 #86

f54rog opened this issue Oct 19, 2021 · 11 comments
Assignees

Comments

@f54rog
Copy link

f54rog commented Oct 19, 2021

After the October updates, the info regarding the line has disappeared from the Ancistrus Home page.
Any suggestions?
Thanks in advanc
Ancistrus home (2)
e

@negan07
Copy link
Owner

negan07 commented Oct 20, 2021

There's something missing maybe: partition usage @74% is too low. Rescue firmware never went under 80% usage.

Has something been removed manually ?

@f54rog
Copy link
Author

f54rog commented Oct 20, 2021

Yes I have removed some packages, I show you which are the remaining N ° 22.
Can you tell me which one is missing to be able to see the status line
package2

@negan07
Copy link
Owner

negan07 commented Oct 20, 2021

All the packages are up to date except samba, the larger, maybe removed.

the guiinfo.sh script is not invoked before loading the page

running manually:
guiinfo.sh
from telnet/ssh
and then loading the webpage should show the full status line: please confirm it.

@f54rog
Copy link
Author

f54rog commented Oct 21, 2021

Hi Negan
I did what you suggested and now everything is ok
Thanks
Fix line stat

@negan07
Copy link
Owner

negan07 commented Oct 21, 2021

Found the bug, related to a wrong string chars interpreter on javascript, fixed on the next core upgrade.

The trick suggested is valid only until next device reboot only.

To fix permanently:

opkg update && opkg install ancistrus-core

If possible, to investigate on 74% on rootfs usage only, can you please post the result of the cmd:

df

@negan07 negan07 self-assigned this Oct 21, 2021
@f54rog
Copy link
Author

f54rog commented Oct 22, 2021

Hi I have installed the new core package v1.7.2
now the bug is fix.
I attach the "df" report
df

@negan07
Copy link
Owner

negan07 commented Oct 23, 2021

It looks regular (suspected a different NAND dom...): maybe the absence of samba 3.6.25 and minidlna mediaserver has boosted free space up.

@f54rog
Copy link
Author

f54rog commented Oct 24, 2021 via email

@negan07 negan07 closed this as completed Oct 26, 2021
@negan07 negan07 changed the title Missing line stat info Bad space chars query parsing on mini_httpd-1.30_170 Nov 2, 2021
@negan07 negan07 reopened this Nov 2, 2021
@negan07
Copy link
Owner

negan07 commented Nov 2, 2021

Reopen because further investigations have found out at least 2 more issues.

openssh keys download button

core setup utilities download nvram button

With the recap page stats above, all seem related to vendor's latest mini_httpd modifications, here added.

D7000_V1.0.1.82_apps_mini_httpd-1.17beta1-000-all.zip

In particular:

@@ -1493,15 +1510,136 @@
  */
 int path_exist(char *path, char *paths[], char *method_str)
 {
-	int i;
-
-	for (i = 0; paths[i]; i++)
+	if ((strcasestr(path, "%2") !=NULL) || (strcasestr(path, "%3") != NULL))
+	{	
+		SC_CFPRINTF("path:%s\n", path);
+		strdecode(path, path);		
+		SC_CFPRINTF("path after decode: %s\n", path);
+	}

involving in fact, all the location.href method calls on the webpages, with blanks.

@negan07 negan07 changed the title Bad space chars query parsing on mini_httpd-1.30_170 Bad blank chars query parsing on mini_httpd-1.30_170 Nov 2, 2021
@negan07 negan07 changed the title Bad blank chars query parsing on mini_httpd-1.30_170 Blank chars query parsing from mini_httpd-1.30_170 Nov 2, 2021
@negan07 negan07 added fixed and removed fixed labels Nov 2, 2021
@negan07
Copy link
Owner

negan07 commented Nov 3, 2021

In the latest mini_httpd own snapshot, the vendor opted to decode query path on some special code chars (beginning with 2 & 3 code num): this involves query GET methods avoiding blank char spaces ( %20 ): for this reason, since now, all the query get string like href must encode blank with +

openssh & core package updates fixes related involved webpages.

@negan07 negan07 closed this as completed Nov 3, 2021
@negan07
Copy link
Owner

negan07 commented Mar 1, 2022

The 1.0.1.84 latest mini_httpd patch update has removed also:

if ((strcasestr(path, "%2") !=NULL) || (strcasestr(path, "%3") != NULL))

condition, decoding all the paths in any case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants