Welcome Guest, Not a member yet? Register   Sign In
Problem with encryption only in Chrome
#1

[eluser]Peri[/eluser]
Hi Guys,


I am having problems using functions to generate authentication keys when used by Chrome, where the value displayed on the screen is different from the value displayed in the "view source" (ctrl + u).
I created two files to check this problem, one runs directly into the www folder (file A), and another run by the CI (file B).
file A
Code:
<?php
echo sha1((uniqid(rand(), true)));
?>

file B
Code:
<?php
class test extends Controller{
    function index(){
        echo sha1((uniqid(rand(), true)));
    }
}
?>

File A
result on the screen: 7d8f8b4e603826f0d16458d8ec7f4a9e4017c761
result on "view source": 7d8f8b4e603826f0d16458d8ec7f4a9e4017c761
ps:alright, the values are identical

File B
result on the screen: e596aae054770e54568924960aae457250d694ad
result on "view source": 49abb4138d9c32419d3e6de8b79a2950c5ed8e3a
ps: the results are different, do not understand how it displays a number and the "source code" is another.

In other browsers the problem does not exist, occurs only in Chrome. Since the problem does not happen in php code directly in the www, just happens via CI, I believe it is a bug in the CI.

any idea ?

tks




Theme © iAndrew 2016 - Forum software by © MyBB