The safe-read Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The safe-read Reference Manual

This is the safe-read Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Fri May 24 09:44:16 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

SAFE-READ

The goal of this project is to create a wrapper around standard Lisp reader to make it able to read input from untrusted sources, such as internet sockets.

Example usage - creating a client-server communication protocol that is based on S-expressions. Using bare READ on both server and client allows the malicious client/server to execute any code on any other networked clients/servers.

As of now, this repository includes variant of READ secure against internbombing, excessive input and macro characters.

Rough definitions

Function SAFE-READ

&optional (stream *standard-input*) s-expression error-status

Variable MAX-INPUT-SIZE

Details

TODO


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 safe-read

Author

Michał "phoe" Herda <phoe@disroot.org>

License

BSD 2-clause

Description

A variant of READ secure against internbombing, excessive input and macro characters.

Dependencies
Source

safe-read.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 safe-read.asd

Location

safe-read.asd

Systems

safe-read (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 safe-read/package.lisp

Parent

safe-read (system)

Location

package.lisp

Packages

safe-read


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 safe-read/safe-read.lisp

Dependency

package.lisp (file)

Parent

safe-read (system)

Location

safe-read.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 safe-read

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *max-input-size*
Package

safe-read

Source

safe-read.lisp (file)

Special Variable: *stream-buffers*
Package

safe-read

Source

safe-read.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: with-temp-package &body BODY
Package

safe-read

Source

safe-read.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: buffer-of STREAM
Function: (setf buffer-of) NEW-VALUE STREAM
Package

safe-read

Source

safe-read.lisp (file)

Function: safe-read &optional STREAM
Package

safe-read

Source

safe-read.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: %max-safe-char%
Package

safe-read

Source

safe-read.lisp (file)

Special Variable: %safe-readtable%
Package

safe-read

Source

safe-read.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: safe-read-handler-case &body BODY
Package

safe-read

Source

safe-read.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: condition-key CONDITION
Package

safe-read

Source

safe-read.lisp (file)

Function: read-limited-line &optional STREAM BUFFER-LENGTH
Package

safe-read

Source

safe-read.lisp (file)

Function: safe-read-buffer STREAM
Package

safe-read

Source

safe-read.lisp (file)

Function: safe-read-no-buffer STREAM
Package

safe-read

Source

safe-read.lisp (file)

Function: trim-leading-whitespace STRING
Package

safe-read

Source

safe-read.lisp (file)

Function: whitespace-p CHAR
Package

safe-read

Source

safe-read.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Conditions

Condition: incomplete-input ()
Package

safe-read

Source

safe-read.lisp (file)

Direct superclasses

condition (condition)

Condition: input-size-exceeded ()
Package

safe-read

Source

safe-read.lisp (file)

Direct superclasses

error (condition)

Condition: malformed-input ()
Package

safe-read

Source

safe-read.lisp (file)

Direct superclasses

error (condition)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, safe-read.asd: The safe-read<dot>asd file
File, Lisp, safe-read/package.lisp: The safe-read/package<dot>lisp file
File, Lisp, safe-read/safe-read.lisp: The safe-read/safe-read<dot>lisp file

L
Lisp File, safe-read.asd: The safe-read<dot>asd file
Lisp File, safe-read/package.lisp: The safe-read/package<dot>lisp file
Lisp File, safe-read/safe-read.lisp: The safe-read/safe-read<dot>lisp file

S
safe-read.asd: The safe-read<dot>asd file
safe-read/package.lisp: The safe-read/package<dot>lisp file
safe-read/safe-read.lisp: The safe-read/safe-read<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   C   F   M   R   S   T   W  
Index Entry  Section

(
(setf buffer-of): Exported functions

B
buffer-of: Exported functions

C
condition-key: Internal functions

F
Function, (setf buffer-of): Exported functions
Function, buffer-of: Exported functions
Function, condition-key: Internal functions
Function, read-limited-line: Internal functions
Function, safe-read: Exported functions
Function, safe-read-buffer: Internal functions
Function, safe-read-no-buffer: Internal functions
Function, trim-leading-whitespace: Internal functions
Function, whitespace-p: Internal functions

M
Macro, safe-read-handler-case: Internal macros
Macro, with-temp-package: Exported macros

R
read-limited-line: Internal functions

S
safe-read: Exported functions
safe-read-buffer: Internal functions
safe-read-handler-case: Internal macros
safe-read-no-buffer: Internal functions

T
trim-leading-whitespace: Internal functions

W
whitespace-p: Internal functions
with-temp-package: Exported macros

Jump to:   (  
B   C   F   M   R   S   T   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   %   *  
S  
Index Entry  Section

%
%max-safe-char%: Internal special variables
%safe-readtable%: Internal special variables

*
*max-input-size*: Exported special variables
*stream-buffers*: Exported special variables

S
Special Variable, %max-safe-char%: Internal special variables
Special Variable, %safe-readtable%: Internal special variables
Special Variable, *max-input-size*: Exported special variables
Special Variable, *stream-buffers*: Exported special variables

Jump to:   %   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   M   P   S  
Index Entry  Section

C
Condition, incomplete-input: Internal conditions
Condition, input-size-exceeded: Internal conditions
Condition, malformed-input: Internal conditions

I
incomplete-input: Internal conditions
input-size-exceeded: Internal conditions

M
malformed-input: Internal conditions

P
Package, safe-read: The safe-read package

S
safe-read: The safe-read system
safe-read: The safe-read package
System, safe-read: The safe-read system

Jump to:   C   I   M   P   S