Author |
Message |
solodev
Joined: 02 Dec 2019 Posts: 3
|
Posted: Mon Dec 02, 2019 8:33 am Post subject: Dynamic Keys with Laravel Controller |
|
|
Good morning
I have a little problem with the use of Dynamic Keys with Laravel.
Is it possible to use Dynamic Keys inside Laravel's Controller ?
If it possible i will buy extended support to open trouble ticket and get more detail info regarding this. |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Mon Dec 02, 2019 10:37 am Post subject: |
|
|
Hi,
It should be possible to use dynamic keys in that way. Please could you give an example of what you are trying to do. _________________ Alastair
ionCube |
|
Back to top |
|
 |
solodev
Joined: 02 Dec 2019 Posts: 3
|
Posted: Mon Dec 02, 2019 2:25 pm Post subject: |
|
|
I supposed its because laravel cannot read or execute " // @ioncube.dk " inside laravel's function.
Everytime i execute function with " // @ioncube.dk " in it , the browser failed and show the popular "The connection was reset" page without any additional error message from laravel.
when I removed " // @ioncube.dk ", it works properly. |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Mon Dec 02, 2019 4:34 pm Post subject: |
|
|
Hi,
It will not be Laravel that is "reading" that but the ionCube Loader.
I wrote "reading" as the comment does not exist in the encoded file but a representation of the function that needs to be called.
What may be happening is that the key generating function is not defined at that point. Suppose you have something like:
//@ioncube.dk foo() -> "myfoooutput"
public function encryptedMethod()
{
}
Then if foo is undefined at the point encryptedMethod() is first called then a fatal error will result saying that the function could not be decoded. That should be logged somewhere.
So you will need to make sure that the script in which "foo" is defined is included by the point that encryptedMethod is first called. _________________ Alastair
ionCube |
|
Back to top |
|
 |
solodev
Joined: 02 Dec 2019 Posts: 3
|
Posted: Wed Dec 04, 2019 4:43 pm Post subject: |
|
|
Hi
it works now, the problem comes when "variable" is used instead of "function"
thanks for your input @Alastair |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Thu Dec 05, 2019 9:30 am Post subject: |
|
|
Hi,
Variable-based dynamic keys should work but the value has to be the expected one at the point that the function is first called. So the following would not work:
<?php
$x = 5;
//@ioncube.dk $x -> "5" RANDOM
function protected_fun()
{
}
$x++;
protected_fun();
?>
That will fail because $x is actually 6 at the point that protected_fun is first called. _________________ Alastair
ionCube |
|
Back to top |
|
 |
|