Ilia Alshanetsky
4386719b07
MFB: Session deserializer protection.
2006-12-26 17:18:28 +00:00
Antony Dovgal
abac61eec7
remove register_globals remains
...
maintain an internal reference of _SESSION, so that it won't be possible to destroy it from userspace
2006-12-20 19:20:59 +00:00
Antony Dovgal
576797c7c1
fix retval type
...
it should be int, not zend_bool
2006-12-04 15:58:35 +00:00
Ilia Alshanetsky
fcaf113b33
MFB: Disallow \0 chars inside session.save_path
2006-12-01 00:27:33 +00:00
Hannes Magnusson
176b72284c
Error message clean up
...
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00
Hannes Magnusson
e531458f89
Remove double "wrong param count" warnings
2006-10-07 22:55:18 +00:00
Ilia Alshanetsky
8786640da8
MFB: Expose session storage module locater and serialization function via
...
PHPAPI
2006-10-06 21:11:57 +00:00
Ilia Alshanetsky
30885c8d99
MFB: Fixed bug #38993 (Fixed safe_mode/open_basedir checks for
...
session.save_path, allowing them to account for extra parameters).
2006-10-01 21:00:00 +00:00
Dmitry Stogov
128548a5c0
Disabled autoconversion of hash keys (from string to unicode) for PHP arrays
2006-09-19 10:38:31 +00:00
Antony Dovgal
103d999dd1
fix typo
2006-08-30 17:57:25 +00:00
Antony Dovgal
1fcfbd873d
change ini handlers to produce E_ERROR if they are called during startup or per request
2006-08-30 16:24:31 +00:00
Antony Dovgal
5b79892659
change E_ERROR to E_WARNING when invalid argument has been passed
...
make sure ini_set() doesn't reset PS(mod) and PS(serializer) to invalid values
2006-08-30 15:42:40 +00:00
Ilia Alshanetsky
9a07b46e00
MFB: fix proto
2006-08-10 21:11:00 +00:00
Ilia Alshanetsky
b97c393f87
MFB: Added support for httpOnly flag for session extension and cookie
...
setting functions.
2006-08-10 13:56:54 +00:00
Antony Dovgal
9b63740847
fix #38289 (segfault in session_decode() when _SESSION is NULL)
2006-08-02 09:15:13 +00:00
Antony Dovgal
873b6d87c6
fix #38278 (session_cache_expire()'s value does not match phpinfo's session.cache_expire)
2006-08-01 08:31:37 +00:00
Ilia Alshanetsky
a081be13fc
MFB: An improved fix for bug #38224
2006-07-27 15:36:43 +00:00
Ilia Alshanetsky
3e00d90ff0
MFB: make C++ compilers happy
2006-07-27 14:13:53 +00:00
Ilia Alshanetsky
a3656ec923
Removed debug code
2006-07-27 14:05:38 +00:00
Ilia Alshanetsky
acbb531a12
MFB: Fixed bug #38224 (session extension can't handle broken cookies).
2006-07-27 14:00:27 +00:00
Ilia Alshanetsky
896c0e0690
MFB: Fixed compiler warnings.
2006-07-13 00:13:42 +00:00
Michael Wallner
1d6027adbd
- add note why replace is 0, so that I don't wonder again in 2 months
...
why session_regenerate_id() sends the session cookie twice
2006-07-12 15:28:18 +00:00
Dmitry Stogov
943960c324
Added automatic module globals management
2006-06-13 13:12:20 +00:00
Michael Wallner
231ad17475
- explicit usage of TS macros
...
# this could have been raised a lot earlier
2006-06-03 11:19:44 +00:00
Michael Wallner
4ce0141713
- new output control code
...
# scan README.NEW-OUTPUT-API to get a grasp
# tree has been tagged with BEFORE_NEW_OUTPUT_API
#
# TODO:
# - improve existing output handlers
# - move zlib.output_compression cruft from SAPI.c to zlib.c
# - output_encoding handling was ambigious, resp. is undefined yet
# - more tests
2006-06-02 19:51:43 +00:00
Marcus Boerger
a4471f70f0
- Fix bug #37510 session_regenerate_id changes session_id() even on failure
2006-05-18 22:07:31 +00:00
foobar
672266c735
- Cleanup
2006-04-10 15:06:51 +00:00
Dmitry Stogov
22055cb8fd
Dropped register_long_arrays, added E_CORE for all dropped setting
2006-03-16 09:44:42 +00:00
Pierre Joye
303bfea78f
- remove register_globals support (aka "Kill the f***ing thing" :)
2006-03-07 00:20:54 +00:00
Dmitry Stogov
0f1209ab3d
Portable unicode string API:
...
- use the same type (int) for zval.value.usr.len and zval.value.str.len
- use union "zstr" as char*/UChar* mixture instead of void*
- Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
- nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Andi Gutmans
e94e25e621
Start nuking safe_mode. Still a lot of work to do...
2006-02-19 00:55:22 +00:00
Rasmus Lerdorf
a5883cc89c
(Missing patch from the PHP 4 tree that got lost in the shuffle)
...
See: http://cvs.php.net/viewcvs.cgi/php-src/ext/session/session.c?r1=1.336.2.39&r2=1.336.2.40
- fix logic. if the client already sent us the cookie, we don't
need to send it again. if the id has been changed, we need to
update the client side.
2006-02-10 07:41:59 +00:00
Frank M. Kromann
921498e38b
MFB51 Export symbols that will allow building WDDX as shared object
2006-01-28 06:18:18 +00:00
Ilia Alshanetsky
0de9cf1e73
MFB51: Added a check for special characters in the session name.
2006-01-15 16:51:34 +00:00
foobar
251c5173fd
bump year and license version
2006-01-01 13:10:10 +00:00
foobar
a208d9a966
- Nuke php3 legacy
2005-12-06 02:28:26 +00:00
foobar
ecd8376f36
- Changed "session.use_only_cookies" to be on by default.
2005-12-02 18:42:41 +00:00
foobar
be3a2c634d
- Improved the fix for #21306 a bit
2005-09-23 08:13:57 +00:00
foobar
6f0648dab6
- Fixed bug #21306 (catch bailouts of write handler during RSHUTDOWN)
2005-09-20 20:56:21 +00:00
Stanislav Malyshev
961d12fa2d
fix crash on restarting static PHP having session modules loaded
2005-09-20 14:05:16 +00:00
Derick Rethans
0f391bb0b3
- Add E_RECOVERABLE.
...
#- Thought I did this before already actually...
2005-09-15 16:19:48 +00:00
Dmitry Stogov
6b622046dc
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
2005-08-22 12:22:16 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
foobar
fd07bc5e6b
nuke duplicate code
2005-06-03 22:09:22 +00:00
Antony Dovgal
29319a81b8
fix typo
...
(see details here: http://news.php.net/php.internals/16350 )
2005-06-01 18:27:50 +00:00
Ilia Alshanetsky
c24900dfa4
Added an optional remove old session parameter to session_regenerate_id().
2005-05-29 16:51:25 +00:00
foobar
26d7b7fbc0
CS fix
2005-05-23 06:46:25 +00:00
Antony Dovgal
a186549ec0
fix compile warning
2005-05-22 12:57:26 +00:00
Rasmus Lerdorf
c1ef105535
Fixed bug 33072 - safemode/open_basedir check for runtime save_path change
2005-05-21 17:37:56 +00:00
Antony Dovgal
8f5ecf6da8
fix bug #32944 (Disabling session.use_cookies doesn't prevent reading session cookies)
2005-05-20 10:27:49 +00:00
Antony Dovgal
76e07faf87
fix leak when register_long_arrays is off
2005-03-24 00:17:16 +00:00
Antony Dovgal
5b78e4c025
hm..
...
fix #28324 _properly_
2005-02-10 20:22:07 +00:00
Antony Dovgal
94982058b6
fix bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is Off)
2005-02-10 19:38:11 +00:00
Stefan Esser
581265f4d1
Correctly initialize ZVAL
2005-01-21 16:03:47 +00:00
Antony Dovgal
d7072f8a9d
efree(name)
2005-01-09 17:49:51 +00:00
Antony Dovgal
c644b2a5a1
fix bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref)
2005-01-09 17:42:02 +00:00
Antony Dovgal
ad76be844b
CS changes (as suggested by Ilia)
2004-12-09 17:15:52 +00:00
Antony Dovgal
e76824c91f
fix segfault in session_module_name() when session.save_handler is empty
2004-12-09 14:14:21 +00:00
Dmitry Stogov
a22fa4d109
Fixed crash in phpinfo() after graceful Apache restart.
2004-12-07 18:02:25 +00:00
Andi Gutmans
11bcaedfc8
- Rename delete_global_variable() to zend_delete_global_variable()
2004-10-04 20:17:06 +00:00
Andi Gutmans
db507dd153
- Commit the variable fetch optimization.
...
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Anantha Kesari H Y
142e92bb70
NetWare specific stat structure access incorporated
2004-09-30 14:31:30 +00:00
Antony Dovgal
0ea23249da
fix error message
2004-09-30 14:20:02 +00:00
Antony Dovgal
fcd702efe4
fix segfault when using unknown/unsupported save_handler and/or serialize_handler (bug #30282 )
2004-09-30 12:19:59 +00:00
Ilia Alshanetsky
6784176b9c
Fixed compiler warnings.
2004-09-14 23:57:53 +00:00
Ilia Alshanetsky
197d65770a
Fixed bug #29925 (Added a check to prevent illegal characters in session
...
key).
2004-09-02 02:44:04 +00:00
Sascha Schumann
5890197024
fix empty_string issue
...
Patch submitted by Antony Dovgal <tony2001@phpclub.net>
2004-08-02 08:27:46 +00:00
Andi Gutmans
56f8195fe5
- Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
...
used to return "" and not bool(false). It's not worth keeping it because
STR_FREE() and zval_dtor() always have to check for it and it slows down
the general case. In addition, it seems that empty_string has been abused
quite a lot, and was used not only for setting zval's but generally in
PHP code instead of "", which wasn't the intention. Last but not least,
nuking empty_string should improve stability as I doubt every place
correctly checked if they are not mistakenly erealloc()'ing it or
calling efree() on it.
NOTE: Some code is probably broken. Each extension maintainer should
check and see that my changes are OK. Also, I haven't had time to touch
PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Andi Gutmans
e5cfb1d05c
- Better stability during premature shutdown of request startup
2004-07-10 07:46:17 +00:00
Sara Golemon
96132bf4fe
if statement logic would never eval to false.
2004-05-08 05:58:18 +00:00
Ilia Alshanetsky
793140873b
Another setting leak in session code (bug #27963 ).
2004-04-13 18:18:22 +00:00
Ilia Alshanetsky
254c8d6ce9
Fixed bug #27963 (Session lifetime setting may leak between requests).
2004-04-13 00:39:05 +00:00
Wez Furlong
32be6f268b
Fix for Bug #26757 : session.save_path defaults to bogus value on win32
...
Merge from branch with one main difference: the default save_path is
set to the empty string on all platforms, whereas the code in the
branch only does so for win32.
2004-03-29 21:44:07 +00:00
Moriyoshi Koizumi
75f83f7bb4
- Fix segfaults on deserialisation of referenced variables.
...
# ALLOC_INIT_ZVAL() initialises the type field to IS_NULL, while
# MAKE_STD_ZVAL() doesn't. This caused a kind of random crash
# when zval_ptr_dtor() was applied on an intact zval created by
# the latter method.
#
# Please check relevant bugs again. There should be some that
# have already been marked as bogus.
2004-02-29 00:26:36 +00:00
foobar
ac92c47b84
Fix bug #26005 (Random "cannot change the session ini settings" errors)
2004-02-24 08:47:35 +00:00
foobar
4441da2754
Improve error messages
2004-02-19 01:54:21 +00:00
Zeev Suraski
7c710a9f9b
Use zval_ptr_dtor() to free variables as soon as they hit refcount of 0.
...
Note: You should not be using ZVAL_DELREF() in day to day usage. Instead,
you should use zval_ptr_dtor(). Use ZVAL_DELREF() only if you're
messing with the refcount directly and know what you're doing.
Note #2 : For clarity, if you want to initialize a new zval with a refcount
of 0, it's best to do that directly, instead of using ZVAL_DELREF
after allocating the zval...
2004-02-15 12:58:19 +00:00
Wez Furlong
6ac364048b
export tsrm id for session globals.
2004-01-09 15:30:07 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +00:00
Ilia Alshanetsky
d3639b1aa7
Fixed bug #24693 (Allow session.use_trans_sid to be enabled/disabled from
...
inside the script).
2003-12-14 23:24:50 +00:00
Derick Rethans
71f9227cc5
- Fixed bug #26548 (Malformed HTTP dates in headers).
2003-12-07 14:29:43 +00:00
Wez Furlong
30b631d9f6
Export this so that shared session modules can use it under win32.
2003-12-02 23:14:31 +00:00
foobar
e85a4cdbd2
- Fixed bug #25780 (ext/session: invalid session.cookie_lifetime causes crash in win32).
2003-10-08 10:22:51 +00:00
Sascha Schumann
394d3b82b0
Alias session_commit to session_write_close, a more intuitive name
...
for the functionality.
2003-09-21 11:53:12 +00:00
Sascha Schumann
a3c89a2e8f
Fix a segfault which occured when using a storage format not capable
...
of expressing references (e.g. WDDX) and deserializing a session variable
whose name conflicted with an existing symbol in the global scope.
PR: #25307
Submitted by: Jani Taskinen
Speling fixes: me
2003-08-29 12:33:47 +00:00
Andrey Hristov
20383f9080
\n at the end of the message is not needed
2003-08-28 20:43:18 +00:00
Sascha Schumann
237da469d7
format string fix
2003-08-28 17:34:33 +00:00
foobar
625600af30
- Prevent crash if non-existing save/serializer handler is tried to be used
...
- Added the registered serializers information to MINFO.
2003-08-26 02:03:41 +00:00
Ilia Alshanetsky
b9b75991e3
Fixed bug #25084 (Make refer check not dependant on register_globals)
2003-08-14 01:30:06 +00:00
Ilia Alshanetsky
93bcd55eaf
emalloc -> safe_emalloc
2003-08-12 00:58:52 +00:00
Ilia Alshanetsky
22c3346967
Fixed bug #22245 (References inside $_SESSION not being handled).
2003-08-11 19:20:44 +00:00
Sascha Schumann
5978734f30
MFB proper fix for #24592
2003-07-22 01:11:07 +00:00
Ilia Alshanetsky
f9a8fc0c09
Fixed bug #24592 (Possible crash in session extnsion, with NULL values)
2003-07-21 21:47:52 +00:00
James Cox
f68c7ff249
updating license information in the headers.
2003-06-10 20:04:29 +00:00
Sascha Schumann
3c58f69fc4
Print NOTICE upon session_start being called while another session is
...
active
2003-06-10 03:56:23 +00:00
foobar
bfe9e39673
MFB: fix proto
2003-05-31 02:33:55 +00:00
foobar
ed1378a975
MFB: Always send a new session cookie upon regenerating id
2003-05-31 02:33:21 +00:00
Sascha Schumann
289ad3960e
Fix the way we create references to (sometimes non-)existing
...
variables.
Credits go to Rob Richards <rrichards@digarc.com> and Zeev
2003-05-15 13:33:18 +00:00
Stanislav Malyshev
cddface7f1
fix TSRM
2003-04-27 16:18:43 +00:00
Stanislav Malyshev
cad71d8c92
MFB 4_3:
...
Fix very nasty bug - session cookie kills one of the cookies
set before it on certain non-Apache SAPIs.
# for example, this code:
# <?
# setcookie("abc", 1);
# setcookie("def", 2);
# session_start();
# ?>
# would output only 'def' cookie on CGI and ISAPI
2003-04-27 16:04:53 +00:00