Changeset 28886


Ignore:
Timestamp:
2011-11-09T19:55:28+01:00 (6 years ago)
Author:
jow
Message:

[package] uhttpd: cope with DES crypted passwd entries by not relying on a leading dollar sign to indicate a cipher

Location:
trunk/package/uhttpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/uhttpd/Makefile

    r28841 r28886  
    99 
    1010PKG_NAME:=uhttpd 
    11 PKG_RELEASE:=29 
     11PKG_RELEASE:=30 
    1212 
    1313PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 
  • trunk/package/uhttpd/src/uhttpd-utils.c

    r28761 r28886  
    783783                        if( realm ) 
    784784                        { 
    785                                 /* is a crypt passwd */ 
    786                                 if( realm->pass[0] == '$' ) 
    787                                         pass = crypt(pass, realm->pass); 
    788  
    789785                                /* check user pass */ 
    790                                 if( !strcmp(pass, realm->pass) ) 
     786                                if (!strcmp(pass, realm->pass) || 
     787                                    !strcmp(crypt(pass, realm->pass), realm->pass)) 
    791788                                        return 1; 
    792789                        } 
Note: See TracChangeset for help on using the changeset viewer.