Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   [patch]: fixed wrong extention check, posted by Emiliano Gabrielli on Tue Feb 8 17:40:54 2005 
    icon2.gif   Re: [patch]: fixed wrong extention check, posted by Stefan Ritt on Sat Feb 12 17:45:39 2005 
       icon7.gif   Re: [patch]: fixed wrong extention check, posted by Emiliano Gabrielli on Wed Feb 16 08:48:52 2005 
Message ID: 948     Entry time: Wed Feb 16 08:48:52 2005     In reply to: 934
Icon: Smile  Author: Emiliano Gabrielli  Author Email: AlberT@SuperAlberT.it 
Category: Bug fix  OS: All  ELOG Version: 2.5.6 cvs 
Subject: Re: [patch]: fixed wrong extention check 
> > current version uses strstr() to check if the file has the expected ascii 
> > text extension ... this is buggy becouse this way a file named 
> > ".txt_hidden_file" or "foo.config.dat" are both seen as .txt files. 
>  
> I added your routine chkext() to the code, but actually use it differently. I 
> display now ASCII files not by their extension, but the code checks for each file 
> to contain non-printable characters. If it contains all printable letters, and does 
> not have the extension PDF, PS or EPS, it's shown inline. 
 
I totally agree with you choice :-) 
ELOG V3.1.5-fe60aaf