It is not ready yet, but...

User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: It is not ready yet, but...

Post by Rathinagiri »

Thanks Roberto.

This gives some insight into the subject. I think I have to read a LOT! :)

http://stackoverflow.com/questions/2821 ... t-involves
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
Joined: Wed Jul 30, 2008 6:43 pm

Re: It is not ready yet, but...

Post by Roberto Lopez »

After reading that thread, there is no so much hope :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: It is not ready yet, but...

Post by Rathinagiri »

I think the combo of the two may work out.

A generic PHP script which can build a query from the necessary parameters.
var data = Querier({
table: "mytable",
columns: {"column1", "column2", "column3"},
where: {
column2: {
op: '=',
value: 'blablabla'
}
}
limit: "10"
});
In the script we can add some prefix to the table names and then build the query in the script using the available parameters.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: It is not ready yet, but...

Post by mol »

It's really hard theme to realize security policies...
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
Joined: Wed Jul 30, 2008 6:43 pm

Re: It is not ready yet, but...

Post by Roberto Lopez »

Rathinagiri wrote:I think the combo of the two may work out.
<...>
Being such a sensitive theme, IMHO, the best way to go, is to keep JMG 'neutral' about this, so the user can make the decision that consider most convenient.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: It is not ready yet, but...

Post by serge_girard »

IMO the best is to keep all SQL stuff away from JS, so only in PHP.

Greetings, Serge
There's nothing you can do that can't be done...
User avatar
luisvasquezcl
Posts: 1259
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: It is not ready yet, but...

Post by luisvasquezcl »

Dear, IMHO, for security is not advisable to create the SQL statement in javascript since the database, however, is fully exposed is better to make a generic script in php for data manipulation.
Totally agree with Serge.
best regards
luis vasquez
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: It is not ready yet, but...

Post by serge_girard »

And beware of (blind) SQL injection !
Each input must be checked, controlled and parsed before execution.

Serge
There's nothing you can do that can't be done...
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: It is not ready yet, but...

Post by Rathinagiri »

Thank you Serge. I do agree with you now. Obscurity is the starting point of security.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
serge_girard
Posts: 3308
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: It is not ready yet, but...

Post by serge_girard »

Best screening of user-input is done in 2 ways: Javascript on client and PHP on server.
Blind SQL injection are URL's like :

Code: Select all

http://hmgforum.com/viewtopic.php?f=50&t=4677&start=10 OR 1=1
OR
http://hmgforum.com/viewtopic.php?f=50&t=4677&start=10%20OR%201=1
Which can cause a lot trouble! Each parameter should carefully be inspected before assuming to be OK.

Serge
There's nothing you can do that can't be done...
Post Reply