Commit Graph

98 Commits

Author SHA1 Message Date
foobar
6a1d0114a7 Silence some compile warnings 2004-01-23 03:28:59 +00:00
Wez Furlong
6ac364048b export tsrm id for session globals. 2004-01-09 15:30:07 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +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
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sascha Schumann
ed68ca44ec Fix types of bug_compat entries
PR: #21312
Submitted by: Rob Richards <rrichards@ctindustries.net>
2003-05-10 16:49:21 +00:00
Sascha Schumann
4226fe67d1 dividend -> divisor
Submitted by: Jesus M. Castagnetto <jmcastagnetto@yahoo.com>
2003-04-05 11:22:15 +00:00
Sascha Schumann
4ec77cfbb5 Refactor new-session-id code 2003-02-18 19:29:38 +00:00
Sascha Schumann
2699c26f42 Remember whether to send a cookie, so that we send out the correct
session id.  Also improve check for active session
2003-02-18 19:13:49 +00:00
Sascha Schumann
32e0c8161c add session_regenerate_id() 2003-02-18 18:50:44 +00:00
Sascha Schumann
5e601732a3 use appropiate prefixes in the ps_module structure so we don't clash
with syscalls
2003-02-11 00:42:14 +00:00
Sascha Schumann
db8b4c6762 Add INI setting session.hash_bits_per_character which enables developers
to choose how session ids are represented, regardless of the hash algorithm.
2003-01-16 07:21:49 +00:00
Sascha Schumann
f2f1f94e36 add INI setting session.hash_function
add support for creating session ids using SHA-1
source more entropy for session ids
2003-01-12 13:07:14 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Sascha Schumann
13f5db1b67 Make the interpretation of gc_probability configurable by adding
session.gc_dividend. The probability of running gc on each request is then
gc_probability/gc_dividend.
2002-10-03 06:45:15 +00:00
Sascha Schumann
b9077e5a9d Nuke PS(vars), we keep the state of registered session variables now
completely in PS(http_session_vars). This avoids bugs which are caused
by a lack of synchronization between the two hashes. We also don't need
to worry about prioritizing one of them.

Add session.bug_compat_42 and session.bug_compat_warn which are enabled
by default. The logic behind bug_compat_42:

IF bug_compat_42 is on, and
IF register_globals is off, and
IF any value of $_SESSION["key"] is NULL, and
IF there is a global variable $key, then
$_SESSION["key"] is set to $key.

The extension emits this warning once per script, unless told otherwise.

"Your script possibly relies on a session side-effect which existed until
PHP 4.2.3. Please be advised that the session extension does not consider
global variables as a source of data, unless register_globals is enabled.
You can disable this functionality and this warning by setting
session.bug_compat_42 or session.bug_compat_warn.
2002-10-03 03:23:02 +00:00
Sascha Schumann
856cd5e17a The session extension ensures now that get_session_var can rely
on the state of $_SESSION/$HTTP_SESSION_VARS. It does not look up
symbols in the global symbol table anymore.

This was achieved by actually planting references between every
$_SESSION["x"] and $x, not only when restoring a session, but also
when registering a session variable (in a register_globals=1 context).

Upon registering a new variable, this memory leak continues to show
up, regardless of register_globals.

ext/session/session.c(272) :  Freeing 0x0818F01C (12 bytes), script=test

Obviously, the newly allocated empty zval is not properly freed.  If anyone
has any idea on how to fix that, please step forward.
2002-10-01 11:59:45 +00:00
Zeev Suraski
900651b7ab Make unset($_SESSION['foo']) actually remove the variable from the session,
if register_globals is off.
2002-08-15 21:44:44 +00:00
Sascha Schumann
dcf67c4433 This option enables administrators to make their users invulnerable to
attacks which involve passing session ids in URLs.
2002-06-12 08:18:36 +00:00
Thies C. Arntzen
23251ebd1a re-add accidentily nuked session_adapt_url() 2002-05-05 16:39:49 +00:00
Thies C. Arntzen
9712a4b3c8 @ - Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
@   and remove variables from the URL-Rewriter. (thies)
i have also modified the session module to use this - so it doesn't
need to fiddle with the output-system any more
2002-05-03 08:00:41 +00:00
Thies C. Arntzen
42158ef7c8 revert session_set_userdata - diffent patch will come shortly 2002-04-28 11:45:45 +00:00
Thies C. Arntzen
eb105693b8 @ - added session_set_userdata() which enables you to specify one variable
@   that will be kept in the browser in addition to the session-id. This
@   only works when using trans-sid sessions (no cookie). (thies)
2002-04-27 14:07:52 +00:00
Sascha Schumann
3a3acee3c9 - Proper use of underscores (s/createsid/create_sid/)
- Bump the API date and remove extra cpp macro
- Pass TSRMLS appropiately to the create_sid function
2002-03-30 16:29:15 +00:00
Mark L. Woodward
346d74a146 Added field to ps_module structure to hold function pointer for the creation
of the session ID string. Default PS_MOD() macro sets this to be the default
creation routine. PS_MOD_SID() macro sets this to a handlers session ID
creation routine.
2002-03-29 16:00:27 +00:00
Sascha Schumann
8141c7761c Merge in session API changes (carry around tsrm context)
Now PHP_SESSION_API is defined to the date of the last change,
so that externa source-code can handle changes more gracefully.
2002-03-06 11:49:51 +00:00
Sascha Schumann
ca59cb7cf9 Weep out all recent commits of Yasuo.
I don't have time right now to leave in the good ones and remove
only the bad ones.

There are some semantical changes which I reject, because
they aim at fixing a bug which is at a completely other location.

Then SID does not gefined anymore properly. (This broken patch
has not been sent to me at all.)

Also, there were *so* many whitespace changes which already
make these commits bogus.
2002-03-06 09:02:31 +00:00
Yasuo Ohgaki
782462a4ca More TSRM work 2002-03-06 00:12:48 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sterling Hughes
ed6d751cd9 move to the ZEND_DECLARE_MODULE_GLOBALS() and ZEND_EXTERN_MODULE_GLOBALS
macros
2002-02-07 22:00:21 +00:00
foobar
86f123ba2e Export php_session_start(). 2002-02-05 01:28:55 +00:00
Yasuo Ohgaki
847fd9d595 Export php_session_register_module/serializer. 2002-01-16 04:56:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Zeev Suraski
a702dc02f9 Fix session_unregister() 2001-12-06 14:20:20 +00:00
Zeev Suraski
2258453ba3 Remove PS_DEL_VAR macro, always use PS_DEL_VARL() 2001-12-06 13:33:10 +00:00
Doug MacEachern
8dd296dd7d AIX compiler doesn't like having a comma at the end of the enum
(Ryan Bloom <rbb@apache.org>)
2001-11-18 20:08:43 +00:00
Sascha Schumann
f341f630d3 Rewrite of unserializer which should be more maintainable and extensible.
Changes pass `make test´ and a couple of custom tests.

Enjoy.
2001-11-10 21:18:34 +00:00
Andrei Zmievski
adc9e9b587 Fix build. 2001-10-22 16:25:43 +00:00
Sterling Hughes
e302d6a5e8 Add an API function for setting the session id from a session module...
# The SRM folks wanted/needed this
2001-09-11 10:13:44 +00:00
Zeev Suraski
f7e7b42d4b Restore session_adapt_url() 2001-08-31 20:03:09 +00:00
Zeev Suraski
b080ddb867 Cleanup and clarify 2001-08-31 19:26:12 +00:00
Zeev Suraski
b781720b36 More fixes and refinements 2001-08-27 00:23:55 +00:00
Zeev Suraski
dc9769ea96 Fix trans-sid.
Still need to figure out how to turn trans-sid only when sessions
are actually used.
2001-08-26 11:14:35 +00:00
Zeev Suraski
7b73aee40f Make the session module more independent 2001-08-26 01:09:20 +00:00
Zeev Suraski
b8763a6f8c Get rid of TRANS_SID - it's always possible to use it now. 2001-08-25 16:09:23 +00:00
Zeev Suraski
13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Zeev Suraski
bc596544a1 add struct name 2001-08-25 12:47:12 +00:00
Zeev Suraski
e140b35b04 API update 2001-08-21 12:57:53 +00:00
Sascha Schumann
373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Sascha Schumann
8aef193056 more tsrm cleanup 2001-08-05 15:29:47 +00:00