Skip to content

Commit 34d0078

Browse files
committed
Cleanup
1 parent 6a1c07f commit 34d0078

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

examples/widgets.fluid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ end
156156
print('User selected option ' .. Response.id)
157157
end
158158
if State then
159-
if State.input then
160-
print('User entered string: ' .. State.input)
161-
end
159+
print('User entered string: ' .. nz(State.input,'NIL'))
162160
if State.checkbox then
163-
print('User activated the checkbox')
161+
print('The user selected the checkbox.')
162+
else
163+
print('The checkbox is unselected.')
164164
end
165165
end
166166
end

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Parasol's ongoing development is focused on enhancing vector graphics programmin
3333

3434
### Application Example
3535

36-
Here's an example of a simple client application written in Fluid. It loads an SVG file and displays the content in a window for the user. Notice that the SVG is parsed in one line of code and all resource cleanup is handled in the background by the garbage collector. You can find more example programs [here](examples/).
36+
This is an example of a simple client application written in Fluid. It loads an SVG file and displays the content in a window for the user. Notice that the SVG is parsed in one line of code and all resource cleanup is handled in the background by the garbage collector. You can find more example programs [here](examples/).
3737

3838
```Lua
3939
require 'gui'

src/document/class/document_class.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@ conjunction with the @Vector module. This means that the output is compatible w
1212
detail with our existing vector API. Consequently, document formatting is closely integrated with SVG concepts
1313
and seamlessly inherits SVG functionality such as filling and stroking commands.
1414
15-
<header>Safety</>
15+
The native document format in Parasol is RIPL. Documentation for RIPL is available in the Parasol Wiki. Other
16+
document formats may be supported as sub-classes, but bear in mind that document parsing is a one-way trip and
17+
stateful information such as the HTML DOM is not supported.
1618
17-
The Document class is intended to be safe to use when loading content from an unknown source. Processing will be
18-
aborted if a problem is found or the document appears to be unrenderable. It is however, not guaranteed that
19-
exploits are impossible. Consideration should also be given to the possibility of exploits that target third party
20-
libraries such as libpng and libjpeg for instance.
21-
22-
By default, script execution is not enabled when parsing a document source. If support for scripts is enabled,
23-
there is no meaningful level of safety on offer when the document is processed. This feature should not be
24-
used unless the source document has been written by the client, or has otherwise been received from a trusted source.
25-
26-
To mitigate security problems, we recommend that the application is built with some form of sandbox that will stop
19+
The Document class does not include a security barrier in its current form. Documents that include scripted code
20+
should not be processed unless they originate from a trusted source and are confirmed as such.
21+
To mitigate security problems, we recommend that the application is built with some form of sandbox that can prevent
2722
the system being compromised by bad actors. Utilising a project such as Win32 App Isolation
2823
https://github.com/microsoft/win32-app-isolation is one potential way of doing this.
2924

src/svg/tests/paths/append_paths.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)