|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<!-- EN-Revision: 990521c9ca64fe7d83016a613b850177d3a90776 Maintainer: Fan2Shrek Status: ready --> |
| 2 | +<!-- EN-Revision: cc1fd3979ee4c308ca9c086583c4d0e45549d3fe Maintainer: Fan2Shrek Status: ready --> |
3 | 3 | <!-- Reviewed: yes --> |
4 | | -<chapter xml:id="reference.luasandbox.differences" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 | +<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="reference.luasandbox.differences"> |
5 | 5 | <title>Différences avec Lua standard</title> |
6 | 6 | <para> |
7 | 7 | LuaSandbox fournit un environnement sécurisé qui diffère de certaines manières de Lua 5.1 standard. |
8 | 8 | </para> |
9 | 9 |
|
10 | 10 | <simplesect xml:id="reference.luasandbox.differences.unavailable"> |
11 | 11 | <title>Fonctionnalités non disponibles</title> |
12 | | - <para> |
13 | | - <itemizedlist> |
14 | | - <listitem> |
15 | | - <para> |
16 | | - Les packages <literal>dofile()</literal>, <literal>loadfile()</literal>, et <literal>io</literal>, car ils permettent un accès direct au système de fichiers. Si nécessaire, l'accès au système de fichiers doit être effectué via des fonctions de rappels PHP. |
17 | | - </para> |
18 | | - </listitem> |
19 | | - <listitem> |
20 | | - <para> |
21 | | - Le package <literal>package</literal>, y compris <literal>require()</literal> et <literal>module()</literal>, car il dépend fortement de l'accès direct au système de fichiers. Une réécriture pure Lua telle que celle utilisée dans l'extension MediaWiki Scribunto peut être utilisée à la place. |
22 | | - </para> |
23 | | - </listitem> |
24 | | - <listitem> |
25 | | - <para> |
26 | | - <literal>load()</literal> et <literal>loadstring()</literal>, pour permettre l'analyse statique du code Lua. |
27 | | - </para> |
28 | | - </listitem> |
29 | | - <listitem> |
30 | | - <para> |
31 | | - <literal>print()</literal>, depuis qu'il écrit sur la sortie standard. Si nécessaire, la sortie doit être effectuée via des fonction de rappels PHP. |
32 | | - </para> |
33 | | - </listitem> |
34 | | - <listitem> |
35 | | - <para> |
36 | | - La plupart du package <literal>os</literal>, car il permet la manipulation du processus et l'exécution d'autres processus. |
37 | | - </para> |
38 | | - <para> |
39 | | - <itemizedlist> |
40 | | - <listitem> |
41 | | - <para> |
42 | | - <literal>os.clock()</literal>, <literal>os.date()</literal>, <literal>os.difftime()</literal>, et <literal>os.time()</literal> reste disponibles. |
43 | | - </para> |
44 | | - </listitem> |
45 | | - </itemizedlist> |
46 | | - </para> |
47 | | - </listitem> |
48 | | - <listitem> |
49 | | - <para> |
50 | | - La plupart du package <literal>debug</literal>, car il permet la manipulation de l'état Lua et des métadonnées de manière à pouvoir casser l'isolation. |
51 | | - </para> |
52 | | - <para> |
53 | | - <itemizedlist> |
54 | | - <listitem> |
55 | | - <para> |
56 | | - <literal>debug.traceback()</literal> reste disponibles. |
57 | | - </para> |
58 | | - </listitem> |
59 | | - </itemizedlist> |
60 | | - </para> |
61 | | - </listitem> |
62 | | - <listitem> |
63 | | - <para> |
64 | | - <literal>string.dump()</literal>, car il peut exposer des données internes. |
65 | | - </para> |
66 | | - </listitem> |
67 | | - <listitem> |
68 | | - <para> |
69 | | - Le package <literal>collectgarbage()</literal>, <literal>gcinfo()</literal>, et <literal>coroutine</literal> n'ont pas été examinés pour la sécurité. |
70 | | - </para> |
71 | | - </listitem> |
72 | | - </itemizedlist> |
73 | | - </para> |
| 12 | + <itemizedlist> |
| 13 | + <listitem> |
| 14 | + <para> |
| 15 | + Les packages <literal>dofile()</literal>, <literal>loadfile()</literal>, et <literal>io</literal>, car ils permettent un accès direct au système de fichiers. Si nécessaire, l'accès au système de fichiers doit être effectué via des fonctions de rappels PHP. |
| 16 | + </para> |
| 17 | + </listitem> |
| 18 | + <listitem> |
| 19 | + <para> |
| 20 | + Le package <literal>package</literal>, y compris <literal>require()</literal> et <literal>module()</literal>, car il dépend fortement de l'accès direct au système de fichiers. Une réécriture pure Lua telle que celle utilisée dans l'extension MediaWiki Scribunto peut être utilisée à la place. |
| 21 | + </para> |
| 22 | + </listitem> |
| 23 | + <listitem> |
| 24 | + <para> |
| 25 | + <literal>load()</literal> et <literal>loadstring()</literal>, pour permettre l'analyse statique du code Lua. |
| 26 | + </para> |
| 27 | + </listitem> |
| 28 | + <listitem> |
| 29 | + <para> |
| 30 | + <literal>print()</literal>, depuis qu'il écrit sur la sortie standard. Si nécessaire, la sortie doit être effectuée via des fonction de rappels PHP. |
| 31 | + </para> |
| 32 | + </listitem> |
| 33 | + <listitem> |
| 34 | + <para> |
| 35 | + La plupart du package <literal>os</literal>, car il permet la manipulation du processus et l'exécution d'autres processus. |
| 36 | + </para> |
| 37 | + <itemizedlist> |
| 38 | + <listitem> |
| 39 | + <para> |
| 40 | + <literal>os.clock()</literal>, <literal>os.date()</literal>, <literal>os.difftime()</literal>, et <literal>os.time()</literal> reste disponibles. |
| 41 | + </para> |
| 42 | + </listitem> |
| 43 | + </itemizedlist> |
| 44 | + </listitem> |
| 45 | + <listitem> |
| 46 | + <para> |
| 47 | + La plupart du package <literal>debug</literal>, car il permet la manipulation de l'état Lua et des métadonnées de manière à pouvoir casser l'isolation. |
| 48 | + </para> |
| 49 | + <itemizedlist> |
| 50 | + <listitem> |
| 51 | + <para> |
| 52 | + <literal>debug.traceback()</literal> reste disponibles. |
| 53 | + </para> |
| 54 | + </listitem> |
| 55 | + </itemizedlist> |
| 56 | + </listitem> |
| 57 | + <listitem> |
| 58 | + <para> |
| 59 | + <literal>string.dump()</literal>, car il peut exposer des données internes. |
| 60 | + </para> |
| 61 | + </listitem> |
| 62 | + <listitem> |
| 63 | + <para> |
| 64 | + Le package <literal>collectgarbage()</literal>, <literal>gcinfo()</literal>, et <literal>coroutine</literal> n'ont pas été examinés pour la sécurité. |
| 65 | + </para> |
| 66 | + </listitem> |
| 67 | + </itemizedlist> |
74 | 68 | </simplesect> |
75 | 69 |
|
76 | 70 | <simplesect xml:id="reference.luasandbox.differences.modified"> |
77 | 71 | <title>Features that have been modified</title> |
78 | | - <para> |
79 | | - <itemizedlist> |
80 | | - <listitem> |
81 | | - <para> |
82 | | - <literal>pcall()</literal> et <literal>xpcall()</literal> ne peuvent pas attraper certaines erreurs, en particulier les erreurs de délai d'attente. |
83 | | - </para> |
84 | | - </listitem> |
85 | | - <listitem> |
86 | | - <para> |
87 | | - <literal>tostring()</literal> n'inclut pas les adresses de pointeur. |
88 | | - </para> |
89 | | - </listitem> |
90 | | - <listitem> |
91 | | - <para> |
92 | | - <literal>string.match()</literal> a été patché pour limiter la profondeur de récursion et pour vérifier périodiquement un délai d'attente. |
93 | | - </para> |
94 | | - </listitem> |
95 | | - <listitem> |
96 | | - <para> |
97 | | - <literal>math.random()</literal> et <literal>math.randomseed()</literal> sont remplacés par des versions qui ne partagent pas l'état avec <literal>rand()</literal> de PHP. |
98 | | - </para> |
99 | | - </listitem> |
100 | | - <listitem> |
101 | | - <para> |
102 | | - Les méta méthodes de Lua 5.2 <literal>__pairs</literal> et <literal>__ipairs</literal> sont supportées par <literal>pairs()</literal> et <literal>ipairs()</literal>. |
103 | | - </para> |
104 | | - </listitem> |
105 | | - </itemizedlist> |
106 | | - </para> |
| 72 | + <itemizedlist> |
| 73 | + <listitem> |
| 74 | + <para> |
| 75 | + <literal>pcall()</literal> et <literal>xpcall()</literal> ne peuvent pas attraper certaines erreurs, en particulier les erreurs de délai d'attente. |
| 76 | + </para> |
| 77 | + </listitem> |
| 78 | + <listitem> |
| 79 | + <para> |
| 80 | + <literal>tostring()</literal> n'inclut pas les adresses de pointeur. |
| 81 | + </para> |
| 82 | + </listitem> |
| 83 | + <listitem> |
| 84 | + <para> |
| 85 | + <literal>string.match()</literal> a été patché pour limiter la profondeur de récursion et pour vérifier périodiquement un délai d'attente. |
| 86 | + </para> |
| 87 | + </listitem> |
| 88 | + <listitem> |
| 89 | + <para> |
| 90 | + <literal>math.random()</literal> et <literal>math.randomseed()</literal> sont remplacés par des versions qui ne partagent pas l'état avec <literal>rand()</literal> de PHP. |
| 91 | + </para> |
| 92 | + </listitem> |
| 93 | + <listitem> |
| 94 | + <para> |
| 95 | + Les méta méthodes de Lua 5.2 <literal>__pairs</literal> et <literal>__ipairs</literal> sont supportées par <literal>pairs()</literal> et <literal>ipairs()</literal>. |
| 96 | + </para> |
| 97 | + </listitem> |
| 98 | + </itemizedlist> |
107 | 99 | </simplesect> |
108 | 100 |
|
109 | 101 | </chapter> |
110 | | - |
111 | 102 | <!-- Keep this comment at the end of the file |
112 | 103 | Local variables: |
113 | 104 | mode: sgml |
|
0 commit comments