473,471 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is it common to use session.use_trans_sid?

Hi all,

Constructing my first web app, and wanted to enable
session.use_trans_sid so that people without cookies could still use my
site.

After braving a nightmare of set_ini(), and .htaccess to try (without
joy) to turn it on, I find when searching for help that the vast
majority of people are trying to turn it OFF.

Now I know there are potential security risks with people mailing or
posting links with session ID's embedded, but surely support is still
needed for non cookie people?

Is it common practice now to only support cookies? Do people roll their
own non-cookie support somehow instead?

Many thanks

Nov 15 '06 #1
7 3290
Hi,

Many session-based sites require cookies. But use_trans_sid would be
the way to go if you want to support cookie-less sessions.

listerofsme...@hotmail.com wrote:
Hi all,

Constructing my first web app, and wanted to enable
session.use_trans_sid so that people without cookies could still use my
site.

After braving a nightmare of set_ini(), and .htaccess to try (without
joy) to turn it on, I find when searching for help that the vast
majority of people are trying to turn it OFF.

Now I know there are potential security risks with people mailing or
posting links with session ID's embedded, but surely support is still
needed for non cookie people?

Is it common practice now to only support cookies? Do people roll their
own non-cookie support somehow instead?

Many thanks
Nov 15 '06 #2
li************@hotmail.com wrote:
Is it common practice now to only support cookies? Do people roll their
own non-cookie support somehow instead?
Its depend on your application. If you build a secure application you
must target a cookies support browser. Btw almost of browsers now
support cookies, even the text based browser like lynx.

--
http://www.mastervb.net
http://www.theukmap.com

Nov 16 '06 #3
li************@hotmail.com wrote:
Hi all,

Constructing my first web app, and wanted to enable
session.use_trans_sid so that people without cookies could still use my
site.

After braving a nightmare of set_ini(), and .htaccess to try (without
joy) to turn it on, I find when searching for help that the vast
majority of people are trying to turn it OFF.

Now I know there are potential security risks with people mailing or
posting links with session ID's embedded, but surely support is still
needed for non cookie people?

Is it common practice now to only support cookies? Do people roll their
own non-cookie support somehow instead?

Many thanks
Hi,

In my humble opinion both URL-rewriting or cookiebased transport of the
PHPSESSID are unsafe (without encryption).
Why?
1) url rewriting: If somebody decides to send an url to somebody that
contains a sessionid, why care? They might as well send the original
username/password to enter that site to their friend.

2) cookie: Anybody that can tab into the IP-packages that go from a to b,
can also see the cookie, just as the url.

So url rewriting doesn't give less or more security than cookie based
PHPSESSID transport...

There are two possible extra things to pay attention to:
a) On shared hosting environments, on most setups, anybody with access on
that server can read the the filenames and content of cookies belonging to
other sites. So if somebody on the same server want to be a bad guy, they
can just steal sessions.
(This is not the case on all setups, if every site on the shared hosting
server has its own storageplace with good file/dir permissions, this "hack"
won't work).

b) With PHPSESSID passed through url, anybody with access to the logfiles of
the server can see the full urls. This won't happen with cookies (since
they are not stored in the logs AFAIK).

The best way to go is to use encrypted transport (https/ssl) if safety is a
concern.

So my advise would be to just use session.use_trans_sid to support cookie
disabled browsers while not giving away security (since the security is low
already).

just my 2 cent.

Regards,
Erwin Moller
Nov 16 '06 #4
Erwin Moller wrote:
So url rewriting doesn't give less or more security than cookie based
PHPSESSID transport...
I think you forgot about the HTTP Referer header. If your site have any
external links--or worse, links to external images--then the session ID
is easily compromised if it sits in the URL.
There are two possible extra things to pay attention to:
a) On shared hosting environments, on most setups, anybody with access on
that server can read the the filenames and content of cookies belonging to
other sites. So if somebody on the same server want to be a bad guy, they
can just steal sessions.
Just the contents of the session file, not the cookie.
So my advise would be to just use session.use_trans_sid to support cookie
disabled browsers while not giving away security (since the security is low
already).
trans_sid doesn't work very well, especially when your site makes use
of Javascript. My advise is to turn it off, since using the feature
means doubling your QA time. Someone savvy enough to disable cookie is
probably savvy enough to make an exception for your site.

Nov 16 '06 #5
Chung Leong wrote:
Erwin Moller wrote:
>So url rewriting doesn't give less or more security than cookie based
PHPSESSID transport...

I think you forgot about the HTTP Referer header. If your site have any
external links--or worse, links to external images--then the session ID
is easily compromised if it sits in the URL.
Yes, add that the the list of possible problems. :-)
>
>There are two possible extra things to pay attention to:
a) On shared hosting environments, on most setups, anybody with access on
that server can read the the filenames and content of cookies belonging
to other sites. So if somebody on the same server want to be a bad guy,
they can just steal sessions.

Just the contents of the session file, not the cookie.
The name of the file reflects the sessionid.
So both are comprimised...
>
>So my advise would be to just use session.use_trans_sid to support cookie
disabled browsers while not giving away security (since the security is
low already).

trans_sid doesn't work very well, especially when your site makes use
of Javascript. My advise is to turn it off, since using the feature
means doubling your QA time. Someone savvy enough to disable cookie is
probably savvy enough to make an exception for your site.
I don't get that Cheong, what goes excactly wrong with JS in combination
with trans_sid? I use btoh a lot, so I am curious what you mean.

Regards,
Erwin Moller
Nov 16 '06 #6
Erwin Moller wrote:
The name of the file reflects the sessionid.
So both are comprimised...
But if there are other variables in the cookies, they won't be
compromised. That's the point I was getting at.
I don't get that Cheong, what goes excactly wrong with JS in combination
with trans_sid? I use btoh a lot, so I am curious what you mean.
Let me clarify. I mean when you have URLs generated through Javascript,
then these won't be transparently handled.

Nov 16 '06 #7
Chung Leong wrote:
Erwin Moller wrote:
>The name of the file reflects the sessionid.
So both are comprimised...

But if there are other variables in the cookies, they won't be
compromised. That's the point I was getting at.
Allright. Agreed. :-)
>
>I don't get that Cheong, what goes excactly wrong with JS in combination
with trans_sid? I use btoh a lot, so I am curious what you mean.

Let me clarify. I mean when you have URLs generated through Javascript,
then these won't be transparently handled.
True. But you can of course add them yourself in your script.
But yes, it is a little bit more work.
But the advantage is that people without cookies can still use your
(JS-enabled) webpages.

And sorry I misspelled your name Chung. :-)

Regards,
Erwin Moller

Nov 17 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ruben van Engelenburg | last post by:
Hi all, I have a strange problem. I have a login procedure that uses a mysql database in which the users are stored. The login procedure is pretty straightforward. In every page I unclude my...
2
by: Rea | last post by:
Hi! I've searched high and low for this on the net but stil haven't found an answer. I'm trying to install both postnuke and xoops on a win2k server with php 4.3.3. and mysql installed. ...
18
by: ZoombyWoof | last post by:
Hi. Im very new to php, and I have a problem here that I cant find the solution for. I have problems with session variables, I want some variables to maintain their value between different php...
3
by: Nick Young | last post by:
Hi All, I am trying to get to grips with PHP Sessions. I have a very simple logon script that works fine so long as the client allows cookies. However when they have cookes turned off (and I...
2
by: Damien | last post by:
Hi to all, I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up PHP 4.3.7, better-normalized MySQL ;o). So I've started using the $_SESSION variable instead of register_globals...
14
by: windandwaves | last post by:
Hi Folk Forgive me for asking such a basic question... I have a site where I want to track the user from start till end... To do this, I have setup the following structure for each page,...
0
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te...
3
by: mikeboston | last post by:
Hi, I am attempting to use php session variables on a server which is running Red Hat Linux, but the variables don't seem to be getting passed between pages. I have tried the same exact test...
1
by: KidQuin | last post by:
I am having problems with session value between pages. Happening in both firefox and IE7. I go between page by links so I know it's not header changes. I use session_start as the first line on the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.