Alina Friedrichsen wrote: > Hello! > >> well I doublechecked it .. and while you are right on the checked input, I >> am sure that >> >> if [ -z "=" ] ... >> >> shouldn't throw an error .. I also tried simple quotes (') > > Yes, only one expression is no Problem in all shell implementations I have > tested.
you are right here .. I missed that if [ ! -z "$do_login" ] && [ "$user" == 'foo' -a "$password" == 'bar' ]; then works, while if [ ! -z "$do_login" -a "$user" == 'foo' -a "$password" == 'bar' ]; then throws the error if do_login='=' >> @Alina: Do you have reason to believe this isn't bug? If yes, why. > > Whats isn't a bug? It's a design error. You can't implement a shell > interpreter, that is compatible with the current syntax and don't have the > Problem, that you can inject a expression with the value argument. It's like > strcpy() in C. > Sorry I only see that test obviously handles one and the same situation different, or better dies with a syntax error in one case. I am sure this is not supposed to happen. .. bud _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel