Tags » Jsonp

JSONP with Mendix REST Services

Mendix is an exciting platform because it simplifies something that tends to get overly-complicated: web-facing, record-based systems.

Because of Mendix’s platform ideology of rapid development, it isolates the developer from the guts of the java code it generates and compiles. 676 more words

Angular Promises vs Observables vs JSONP

There are 3 type asynchronous http call methodology in Angular.

1- Promises
2- Observables
3- JSONP

A Promise handles a single event when an async operation completes or fails. 529 more words

Angular

[JS] 跨域資料傳遞使用JSONP

因為同源政策的關係,導致網站無法跨域取得資料,但若又需要跨域取得資料該怎辦?

透過JSONP(JSON with padding)便可以達成,由於網頁上擁有”src”屬性的標籤都具跨域的能力,於是便用此特點進行跨域的資料傳遞。

使用者傳遞一個callback的參數給server端,然後server端返回資料時將這個callback參數作為函數名並將JSON資料當作其參數串成字串回傳,因此使用者便可以透過src的方式來取得資料。

如下前端部分:

function jsonpFn (data) {
  console.log(data.status);
}

var script = document.createElement('script');
script.src = 'http://xxx.com/?callback=jsonpFn';
document.body.appendChild(script);

後端部分:

<?php
  $result = "{'status': 'success'}";
  $callback = $_GET['callback'];
  echo $callback."($result)";
?>
… 16 more words
Javascript

JSON JSONP

Introduction to JSONP, JSON formatter, the server file, the JavaScript function, and creating a dynamic script tag

JSONP

JSONP: a method for sending JSON data without worrying about cross-domain issues. 419 more words

JSON Guide

Multiple Vulnerabilities in ASUS Routers

Summary

Various models of ASUS RT routers have several CSRF vulnerabilities allowing malicious sites to login and change settings in the router; multiple JSONP vulnerabilities allowing exfiltration of router data and an XML endpoint revealing WiFi passwords. 1,534 more words

Advisories