Welcome Guest, Not a member yet? Register   Sign In
DX Auth 1.0.6 (Authentication library)

[eluser]aidanmcg33[/eluser]
thanks

[eluser]BorisK[/eluser]
dexcell,

can you please update the installation instructions and change the lines:

2. Copy captcha folder into your CI folder.

to

2. Copy captcha folder into your CI folder. Make captcha folder writable by the web server.

[eluser]BorisK[/eluser]
Two bugs:

1. When I log in as non-admin, having no allowed_uri's set I get this warning:
Severity: Warning

Message: in_array() [function.in-array]: Wrong datatype for second argument

Filename: libraries/DX_Auth.php

Line Number: 173

Resolution: In DX_Auth.php in function check_uri_permissions at around line 503 change the code to:
Code:
// Loop each roles URI permissions
                foreach ($roles_allowed_uris as $allowed_uris)
                {
                    if ($allowed_uris===NULL)
                    {
                        break;
                    }
                    
                    // Check if user allowed to access URI
                    if ($this->_array_in_array(array('/', $controller, $action), $allowed_uris))
                    {
                            $found = TRUE;
                            // Stop loop
                            break;
                    }

If allowed_uri's is not set it skips further processing.

2. When you fix above the page gets redirected to /auth/deny. There is no such method in auth controller, so you get "404 Page Not Found".

[eluser]schmack[/eluser]
I'm having an installation/config issue that I can't seem to get past. I get the following error when trying to view the examples:

Code:
PHP Parse error: parse error, unexpected T_OBJECT_OPERATOR in /var/www/vhosts/mysite.com/httpdocs/system/application/libraries/DX_Auth.php on line 820

Any ideas? Thanks!

[eluser]Sarre[/eluser]
What version of PHP are you running?
Could be because of chaining...

[eluser]schmack[/eluser]
4.3, so I bet that's my problem from reading other posts. I'll upgrade to 5 and see what happens.

Thanks!

[eluser]schmack[/eluser]
That did the trick. This CI newb is getting a trial by fire. Thanks for the quick reply!

[eluser]dexcell[/eluser]
[quote author="BorisK" date="1230001305"]Two bugs:

1. When I log in as non-admin, having no allowed_uri's set I get this warning:
Severity: Warning

Message: in_array() [function.in-array]: Wrong datatype for second argument

Filename: libraries/DX_Auth.php

Line Number: 173

Resolution: In DX_Auth.php in function check_uri_permissions at around line 503 change the code to:
Code:
// Loop each roles URI permissions
                foreach ($roles_allowed_uris as $allowed_uris)
                {
                    if ($allowed_uris===NULL)
                    {
                        break;
                    }
                    
                    // Check if user allowed to access URI
                    if ($this->_array_in_array(array('/', $controller, $action), $allowed_uris))
                    {
                            $found = TRUE;
                            // Stop loop
                            break;
                    }

If allowed_uri's is not set it skips further processing.

2. When you fix above the page gets redirected to /auth/deny. There is no such method in auth controller, so you get "404 Page Not Found".[/quote]

1. Thanks. This was reported before but i cannot produce the bug, but i will add that code Smile

2. Yes, you need to create your own function in the controller.

[eluser]dexcell[/eluser]
[quote author="BorisK" date="1229999361"]dexcell,

can you please update the installation instructions and change the lines:

2. Copy captcha folder into your CI folder.

to

2. Copy captcha folder into your CI folder. Make captcha folder writable by the web server.[/quote]

Will do, thanks Smile

[eluser]TB[/eluser]
Hi,

I think this is a great library, but have I come across a few bugs. Most of them are already discussed in this topic.

When I try to login as user or as admin, with password 'hello' (found this in the userguide), it gives me 'Your password was incorrect.' I solved it by setting the admin password in the database to:
Code:
$1$i75.Do4.$l3kV.GTx/n8.GWZPEyrXm0
and the user password to:
Code:
$1$bO..IR4.$oDi44/8oYWYxzQ13ZRltu1

.. which makes
Code:
if (crypt($password, $stored_hash) === $stored_hash)
on line 885 of DX_Auth.php evaluate to true.

I am still wondering what the original hashes represented.

Keep up the good work :lol:

Thomas




Theme © iAndrew 2016 - Forum software by © MyBB