Bir oturum değişkeni içinde hassas veri depolamak için güvenli midir? Ya da müşteri tarafından değiştirilebilir?
Oturumun veri sunucuda depolanan (generally, in files).
Yani, istemci tarafından değiştirilemez -- except if you have a security hole, of course ; but, if that's the case, people will most probably prefer modifying something more critical, like data in your database.
Though, as it's generally stored in files on your server, if you are using some kind of shared hosting, other users on your server might be able to see the sessions' files... At least, if your hosting service didn't configure the server so each user is in isolation.
This is definitely NOT safe in a shared hosting environment like most web hosting deals that do not include a dedicated (virtual o physical) server. Since session data is stored in the filesystem and is by default NOT ENCRYPTED in any way it is possible (depending on your web hosters configuration) that scripts from other hosting accounts may gain access to your session data.
Hassas veriler için çok daha güvenli bir yer vardır. Verilerin niteliğine bağlı olarak, hatta veri depolama şifreleme düşünebilirsiniz.
Uygulama oturum verileri teoride güvenli olan bir adanmış sunucu üzerinde yaşasa bile, oturumları çok güvenilir bir depolama ortamı değildir. Herhangi bir kalıcı ve / veya hassas veriler için veritabanı kullanın.