git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103507
13f79535-47bb-0310-9956-
ffa450edef68
[Remove entries to the current 2.0 section below, when backported]
+ *) htpasswd no longer refuses to process files that contain empty
+ lines. [André Malo]
+
*) Restore the ability to disable the use of AcceptEx on Win9x systems
automatically. PR 28529. [André Malo]
char *user = NULL;
char tn[] = "htpasswd.tmp.XXXXXX";
char *dirname;
- char scratch[MAX_STRING_LEN];
+ char *scratch, cp[MAX_STRING_LEN];
int found = 0;
int i;
int alg = ALG_CRYPT;
while (apr_file_gets(line, sizeof(line), fpw) == APR_SUCCESS) {
char *colon;
- if ((line[0] == '#') || (line[0] == '\0')) {
+ strcpy(cp, line);
+ scratch = cp;
+ while (apr_isspace(*scratch)) {
+ ++scratch;
+ }
+
+ if (!*scratch || (*scratch == '#')) {
putline(ftemp, line);
continue;
}
- strcpy(scratch, line);
/*
* See if this is our user.
*/