《Slides Dev Web》 12. Risques applicatifs
Fondation pour améliorer la sécurité des webapps • Fondée en 2004, internationale, sans but lucratif • Référence principale dans le domaine • Propose : – Top 10 (web et mobile2) : Méthode3, CVSS4, CWE5 – Grande HTML – SQL – Javascript – … Injections SQL • Modifier les requêtes envoyées au SGBD • Obtention d’un résultat non prévu par le développeur • Deviner la structure du code pour l’exploiter • SQL est puissant modification du DOM (Exemple11) Cross Site Request Forgery (CSRF - Sea Surf) • Principe : – Faire réaliser à quelqu’un une action à son insu, avec ses propres infos d’authentifi- cation (credentials)0 码力 | 12 页 | 474.37 KB | 1 年前3
《Slides Dev Web》 05. JavaScript & DOM
des différentes implémentations – Conversions avec BabelJS10 • JavaScript : implémentation Firefox (réf. MDN) • Variantes (à transpiler) : – Typescript11 : variante fortement typée, avec des classes (MS) 26https://developer.mozilla.org/en/docs/Web/Events/DOMContentLoaded 27https://nodejs.org 28https://www.reddit.com/r/node/comments/nx9qqr/deno_vs_nodejs_a_comparison_you_need_to_know/ 29https://www.npmjs.com 30https://colorlib noeud = $("p"); // select node(s) noeud.remove(); Références • Une réintroduction à JavaScript34 • How does it feel to learn JS in 201635 • Référence MDN36 • Tutoriels The Modern JS Tuto37 w3schools380 码力 | 10 页 | 91.95 KB | 1 年前3
《Slides Dev Web》 07. jQuery
tâches fréquentes : – Manipulations DOM – Manipulations CSS – Réponse aux évenements du navigateur – Effets visuels et animations – Requêtes et réponses Ajax • Abstraction implémentations différents navigateurs sélectionne les éléments de classe "post" var node = $('New
'); // un nouveau noeud • Pour être sûr que le document est chargé : $(document).ready(function(){ console.log("prêt!") }); ou $(function() find() – Frères : sibling(), next(), prev() • Filtrage – first(), last(), eq() – filter(), not() – Référence4 Modifications de contenu • Accès au contenu : – text() : get/set le texte entre les balises0 码力 | 5 页 | 49.45 KB | 1 年前3
《Slides Dev Web》02. Introduction aux frameworks PHP
similaires pour de nombreuses applis • Composants de haut-niveau réutilisables (faible couplage) • Règles de codage et d’architecture • Code sûr et efficace • Facilite les tests et la gestion de projets complexes des infos • Front Controller – Traitement et dispatch des requêtes grâce aux routes – (bootstrap, ré-écriture des URL, …) • Object Relational Mapping5 – Active Record, Table Data Gateway, Data Mapper • Les URL doivent être explicites : – Manipulées par l’utilisateur – Utilisées pour le référencement • Cohérence avec l’implémentation MVC : http://app.host.tld/controller/action[/key/val] • Le routage0 码力 | 24 页 | 1.03 MB | 1 年前3
Guzzle PHP 6.5 Documentation($response->getHeaders() as $name => $values) { echo $name . ': ' . implode(', ', $values) . "\r\n"; } The body of a response can be retrieved using the getBody method. The body can be used as a the body as a string. $r = $client->request('POST', 'http://httpbin.org/post', [ 'body' => 'raw data' ]); // Provide an fopen resource. $body = fopen('/path/to/file', 'r'); $r = $client->request('POST' hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload JSON data and set the appropriate header is using the json request option: $r = $client->request('PUT'0 码力 | 65 页 | 311.42 KB | 11 月前3
Guzzle PHP 6.5 Documentationforeach ($response->getHeaders() as $name => $values) { echo $name . ': ' . implode(', ', $values) . "\r\n"; } The body of a response can be retrieved using the getBody method. The body can be used as a string string. $r = $client->request('POST', 'http://httpbin.org/post', [ 'body' => 'raw data' ]); 1.2. Quickstart 9 Guzzle, Release // Provide an fopen resource. $body = fopen('/path/to/file', 'r'); $r = $c hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload JSON data and set the appropriate header is using the json request option: $r = $client->request('PUT'0 码力 | 50 页 | 237.04 KB | 11 月前3
Guzzle PHP 5.3 Documentationobject to the body request option. $r = $client->post('http://httpbin.org/post', ['body' => 'raw data']); You can easily upload JSON data using the json request option. $r = $client->put('http://httpbin.org/put' /httpbin.org/post', [ 'body' => [ 'field_name' => 'abc', 'file_filed' => fopen('/path/to/file', 'r'), 'other_file' => new PostFile('other_file', 'this is the content') ] ]); Just like when sending POST $postBody->setField('foo', 'bar'); $postBody->addFile(new PostFile('test', fopen('/path/to/file', 'r'))); $response = $client->send($request); 1.2.5 Cookies Guzzle can maintain a cookie session for you0 码力 | 63 页 | 275.75 KB | 11 月前3
Guzzle PHP 5.3 Documentationobject to the body request option. $r = $client->post('http://httpbin.org/post', ['body' => 'raw data']); You can easily upload JSON data using the json request option. $r = $client->put('http://httpbin.org/put' org/post', [ 'body' => [ 'field_name' => 'abc', 'file_filed' => fopen('/path/to/file', 'r'), 'other_file' => new PostFile('other_file', 'this is the content') ] ]); Just like $postBody->setField('foo', 'bar'); $postBody->addFile(new PostFile('test', fopen('/path/to/file', 'r'))); $response = $client->send($request); Cookies Guzzle can maintain a cookie session for you if0 码力 | 72 页 | 312.62 KB | 11 月前3
Guzzle PHP v5 Documentationforeach ($response->getHeaders() as $name => $values) { echo $name . ': ' . implode(', ', $values) . "\r\n"; } The body of a response can be retrieved using the getBody method. The body can be used as a string string. $r = $client->request('POST', 'http://httpbin.org/post', [ 'body' => 'raw data' ]); 1.2. Quickstart 9 Guzzle, Release // Provide an fopen resource. $body = fopen('/path/to/file', 'r'); $r = $c hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload JSON data and set the appropriate header is using the json request option: $r = $client->request('PUT'0 码力 | 49 页 | 231.08 KB | 11 月前3
Guzzle PHP v5 Documentation($response->getHeaders() as $name => $values) { echo $name . ': ' . implode(', ', $values) . "\r\n"; } The body of a response can be retrieved using the getBody method. The body can be used as a the body as a string. $r = $client->request('POST', 'http://httpbin.org/post', [ 'body' => 'raw data' ]); // Provide an fopen resource. $body = fopen('/path/to/file', 'r'); $r = $client->request('POST' hello!'); $r = $client->request('POST', 'http://httpbin.org/post', ['body' => $body]); An easy way to upload JSON data and set the appropriate header is using the json request option: $r = $client->request('PUT'0 码力 | 62 页 | 309.78 KB | 11 月前3
共 90 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













