1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-11 02:42:23 +03:00
Commit Graph

104 Commits

Author SHA1 Message Date
Stefan Fritsch
93d536555a htdbm, htpasswd: print error message if out of memory
PR: 54345


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425775 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 21:16:17 +00:00
Rainer Jung
93bcb9c25f htdbm:
- Add vxl to getopt
 - Remove "-C" from usage for -x and -l
 - Add space between -C and "cost"
 - Usage reorder and sync with htpasswd
htpasswd:
 - Usage reorder and sync with htdbm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420644 13f79535-47bb-0310-9956-ffa450edef68
2012-12-12 12:34:55 +00:00
Stefan Fritsch
566312f891 Optionally read passwords from stdin
PR: 40243
Submitted by: Adomas Paltanavicius <adomas paltanavicius gmail com>, sf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395256 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:10:14 +00:00
Stefan Fritsch
c2eb43db55 add support for bcrypt
PR: 49288


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395255 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:06:10 +00:00
Stefan Fritsch
7d8882b4b4 Start refactoring of htpasswd and htdbm
- Move many common code parts into separate source file. This adds some
  of htpasswd's recent improvements to htdbm.
- Rework salt generation to use the full 48bit of entropy for MD5
  Previously, it would only generate 2^32 different salts on a given
  platform.
- Use apr_getopt().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395253 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 09:02:19 +00:00
Stefan Fritsch
7ab70fec3d htpasswd: Use correct file mode for checking if file is writable.
Also switch to the non-deprecated APR_FOPEN_* flags

PR: 45923


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369618 13f79535-47bb-0310-9956-ffa450edef68
2012-08-05 16:55:00 +00:00
Stefan Fritsch
6367f6a183 note more prominently that SHA and crypt are insecure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1352910 13f79535-47bb-0310-9956-ffa450edef68
2012-06-22 14:56:44 +00:00
Joe Orton
658147f2d2 * support/htpasswd.c (mkrecord): Handle crypt() failure.
* support/htdbm.c (htdbm_make): Handle crypt() failure.

Submitted by: Paul Wouters <pwouters redhat.com>, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1346905 13f79535-47bb-0310-9956-ffa450edef68
2012-06-06 14:20:27 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Jeff Trawick
f97551a625 hide some unused code on Win32 and NetWare
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089910 13f79535-47bb-0310-9956-ffa450edef68
2011-04-07 15:16:20 +00:00
Stefan Fritsch
7dc061ebd1 Fix brown-paper-bag bug.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829431 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 18:37:28 +00:00
Stefan Fritsch
7d0f95eec9 Verify that password has been truncated before printing a warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829355 13f79535-47bb-0310-9956-ffa450edef68
2009-10-24 12:39:41 +00:00
Stefan Fritsch
0a7227e732 Print a warning if a password is truncated by crypt.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829162 13f79535-47bb-0310-9956-ffa450edef68
2009-10-23 18:13:46 +00:00
Stefan Fritsch
35d67d95ec htpasswd: Improve out of disk space handling
PR: 30877


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@826822 13f79535-47bb-0310-9956-ffa450edef68
2009-10-19 21:41:31 +00:00
Stefan Fritsch
5ed1619e1d Change the default algorithm for htpasswd to MD5 on all platforms. Crypt
with its 8 character limit is not useful anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@826805 13f79535-47bb-0310-9956-ffa450edef68
2009-10-19 20:53:04 +00:00
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Joe Orton
c40628c172 * support/htpasswd.c (seed_rand): Fix compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630139 13f79535-47bb-0310-9956-ffa450edef68
2008-02-22 10:14:07 +00:00
Paul Querna
364dc4667f Fix printing of error message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@629218 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 20:39:32 +00:00
Paul Querna
9aa0687d9c Improve generation of the seed to rand, by using apr_generate_random_bytes,
rather than the current time as a seed.

PR: 31440


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@629164 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 17:05:26 +00:00
Paul Querna
69e6e619c1 Improve salt string generation.
PR: 31440
Submited by: Andreas Krennmair <ak synflood.at>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@629159 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 16:55:47 +00:00
Jeff Trawick
8e3ede5826 Make the hardcoded checks for platforms-without-crypt consistent.
This apparently fixes some oddities on TPF.

Submitted by: David Jones <oscaremma gmail.com>
Reviewed by:  wrowe, trawick



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@525571 13f79535-47bb-0310-9956-ffa450edef68
2007-04-04 18:37:30 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jeff Trawick
7eb56e2786 If we don't have a prototype for crypt() we shouldn't
be calling it.

Casting to the desired pointer return type hides the 
truncation of the return value when sizeof(ptr) > 
sizeof(int) and no prototype was included.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@393365 13f79535-47bb-0310-9956-ffa450edef68
2006-04-12 01:58:08 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Paul Querna
75c1bee252 - Use the correct newline in htpasswd, instead of always using \n.
PR: 25090


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179689 13f79535-47bb-0310-9956-ffa450edef68
2005-06-03 01:11:44 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Martin Kraemer
a22426c699 Use standardized names for ISO-8859-1, see http://www.iana.org/assignments/character-sets
(Using the name iso8859-1 may still work, because it is aliased in apr-iconv/ccs/charset.aliases)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104078 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 13:33:24 +00:00
André Malo
18f32ed6a9 no longer refuse to process files that contain empty lines
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103507 13f79535-47bb-0310-9956-ffa450edef68
2004-04-24 18:56:00 +00:00
Thom May
a1d5470e1e htpasswd.c: various cleanups and move to using apr_temp_dir_get()
Submitted by: Guenter Knauf
Reviewed by: Thom May


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102950 13f79535-47bb-0310-9956-ffa450edef68
2004-03-13 22:18:19 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
c0dcb76491 fix copyright dates according the first cehck in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102592 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 14:14:53 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Thom May
28fa358552 Add a delete flag to htpasswd.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99828 13f79535-47bb-0310-9956-ffa450edef68
2003-05-14 19:23:30 +00:00
André Malo
abe287956a (grabbed from archive)
Check the processed file on validity. If a line is not empty
and not a comment, it must contain at least one colon. Otherwise exit
with error code 7.

Submitted by: Thom May <thom@planetarytramp.net> (on 2002-07-02)
              Kris Verbeeck <Kris.Verbeeck@ubizen.com> (on 2002-10-22)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99771 13f79535-47bb-0310-9956-ffa450edef68
2003-05-13 03:40:29 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jeff Trawick
3cf507350f template parameter passed to apr_file_mktemp() must be modifiable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97142 13f79535-47bb-0310-9956-ffa450edef68
2002-10-08 11:21:25 +00:00
Ryan Bloom
edd2f99905 We can't just create the temporary file in the current directory. If that
directory isn't writable, htpasswd won't work.  This adds a function
whose responsibility it is to find a valid directory for temporary files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97136 13f79535-47bb-0310-9956-ffa450edef68
2002-10-08 01:15:46 +00:00
Justin Erenkrantz
63be389b7b Revert r1.57 and r1.58 per Will Rowe's veto.
(I intend to add this back in if/when mod_authn_file can support the
{algo} password semantics, but we can't do a release with this code in
place.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96817 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 23:05:42 +00:00
Brian Pane
eac90b66ed truncate existing file if "-c" is used
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96811 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 17:49:37 +00:00
William A. Rowe Jr
5272c10e4f Move another non-exists test into the non-existing tests block, and
clean up the comments a bit more.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96810 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 16:43:24 +00:00
Brian Pane
f931893a12 More code cleanup: added some error checks and removed unused functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96806 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 08:44:26 +00:00
Brian Pane
40e3215999 remove single-byte file reads
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96805 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 08:03:19 +00:00
Brian Pane
4de8023f20 cleaned up the file access checking
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96804 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 06:53:40 +00:00
William A. Rowe Jr
ae2b699a9f 1. Eliminate perror(), it's not portable.
2. Restructure bit tests, ! is a logical, not a bitwise negation.

  3. Clean up just a bit of other ! syntax fooness and excess parens.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96802 13f79535-47bb-0310-9956-ffa450edef68
2002-09-14 03:40:11 +00:00
Bradley Nicholes
5cd4500b31 Avoid a compiler error on NetWare
Submitted by: Jean-Jacques Clar (jjclar@novell.com)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96753 13f79535-47bb-0310-9956-ffa450edef68
2002-09-10 22:32:46 +00:00
Justin Erenkrantz
3283ae992d Add ability to htpasswd (via -5) to produce non-obfuscated MD5 hashes.
mod_auth_digest's passwords can not be obfuscated by the APR magic
sequence (as we don't call apr_password_validate on them), therefore we
need a tool to produce true MD5 hex hashes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96737 13f79535-47bb-0310-9956-ffa450edef68
2002-09-10 03:00:50 +00:00
Justin Erenkrantz
6c25fe06ea Style fixes. (long lines)
(Justin tweaked one character in this patch.)

Submitted by:	Thom May <thom@planetarytramp.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96440 13f79535-47bb-0310-9956-ffa450edef68
2002-08-19 07:28:18 +00:00
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +00:00