Question

In: Computer Science

what is JSON and why we use it, what the threats are and how we mitigate...

what is JSON and why we use it, what the threats are and how we mitigate against them, how PHP sanitises the data, how MySQL save the data and how data gets from the server onto the web page.

Solutions

Expert Solution

what is JSON and why we use it

Ans:-

  1. JSON stands for JavaScript Object Notation.
  2. JSON is basically a data-interchange format.
  3. JSON is used to store and exchange data like exchanging data between browser and server
  4. It is in text format.
  5. this text can be converted into javascript Object.
  6. Like an Object JSON contains key and values separated using colon ':' and  two key-value pair is separated by a comma ','

what the threats are and how we mitigate against them

JSON is vulnerable to content-level attack.

JSON injection: In this, the attacker writes unvalidated data into JSON like SQL code which when parsed can cause a change in the JSON file. This can be of two types server:-

  • server-side
  • client-side

this can be prevented by sanitising the data both server-side and client-side

how PHP sanitises the data

Data Sanitizing is an important process. what data Sanitizing basically does is check for the illegal character and removes any illegal character from data. We need to sanitise the data before it runs and later causes problems.

php has a list of various Sanitize filters to sanitises the data like :

  • FILTER_SANITIZE_EMAIL Remove all characters except letters, digits and !#$%&'*+-=?^_`{|}~@.[].
  • FILTER_SANITIZE_ENCODED URL-encode string, optionally strip or encode special characters.
  • FILTER_SANITIZE_NUMBER_INT Remove all characters except digits, plus and minus sign.
  • FILTER_SANITIZE_NUMBER_FLOAT Remove all characters except digits, +- and optionally .

how MySQL save the data

SQL server has data file and log file, data file is of two types primary and secondary.

SQL database can have many data or log file but a single primary data file.

primary data file is initial data file and points to other data files.

Disk allocated for storing data file is divided into pages. Pages are basic storage unit in sql server. a page is of 8 kb size.

how data gets from the server onto the web page.

Basically a request is sent to the server by the browser. Then server can either accept the request or reject it depends on various conditions. If the browser accepts the request then browser send back a response to the browser and after that start sending files of the website to the browser. The files are send in the form of packets which are reassembeled at the client side by the browser and then displayed.


Related Solutions

Python programming ***************************************************************************************************** If we load the json files then how could we use the objects...
Python programming ***************************************************************************************************** If we load the json files then how could we use the objects to extract particular values from those files. eg: fi1 = open("king.json", "rb") obj1 = yaml.safe_load(fi1.read()) fi1.close() fi2 = open("queen.json", "rb") obj2 = yaml.safe_load(fi2.read()) fi2.close() Now if the JSON file queen.json had elements like name, rule year, children, etc. and we wanted the name of the queen who ruled between particular years, how would we do it? second would be getting a value common for...
Describe the STRIDE model and give an example of how to mitigate each of the threats.  
Describe the STRIDE model and give an example of how to mitigate each of the threats.  
how do we use dictionaries to get json api in MIT app inventor
how do we use dictionaries to get json api in MIT app inventor
Identify Information Security threats for “Autonomous vehicles” and how a business could mitigate these?
Identify Information Security threats for “Autonomous vehicles” and how a business could mitigate these?
Risk is inevitable. How do we measure it? What can we do to mitigate risk? How...
Risk is inevitable. How do we measure it? What can we do to mitigate risk? How is inventory level a prospective risk? How are accounts receivable a prospective risk
What are the ledgers, why do we use them? And then HOW do we use them,...
What are the ledgers, why do we use them? And then HOW do we use them, how does information get into them how do balances get extracted. And then what should the balances for various accounts be, i.e. assets, liabilities, expenses, revenues, equity, dividends. Why SHOULD they have a particular balance as either debit or credit.
What are chi distributions, how do we use them, when do we use them, and why...
What are chi distributions, how do we use them, when do we use them, and why are they important?
-The Scientific Method: Understand what it is, how and why we use it and be able...
-The Scientific Method: Understand what it is, how and why we use it and be able to apply it to hypothetical experimentation. -Goals of behavioral science: -The Difference between Applied and Basic research (be able to identify whether a research question is one or the other). -What is the relationship between Cause and Effect? -Why does research demand skepticism? -How does research relate to program evaluation? -Be able to compare “science” versus “pseudoscience”.
When discussing threats to biodiversity, we often use the acronym HIPPO. What does this stand for?...
When discussing threats to biodiversity, we often use the acronym HIPPO. What does this stand for? Explain each letter in the HIPPO acronym. In your opinion, which HIPPO activity is the greatest threat to biodiversity? Why? What are 3 ways we can reduce the impact on species yet still provide for the needs of humans?
Why are internal threats a major challenge for organizations? How can internal threats be minimized?
Why are internal threats a major challenge for organizations? How can internal threats be minimized?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT