Commit Graph
16 Commits
Author SHA1 Message Date
David Evans 8ac6696b3c Implement encoding logging mode for redaction (#678)
Resolves #662

Command/Response Encoder can be configured using loggingMode. If turned on then user-sensitive strings won't be encoding, but any metadata will.

For example, 1 LOGIN username password becomes 1 LOGIN "" "", thereby hiding the user's information.
2022-01-26 15:50:12 -08:00
David Evans 8565ac900e Rename Command types to better represent what they are (#557)
Resolves #522

Some command names were misleading, they should be better now. Also removed a redundant initialiser.

PartialCommandStream -> SynchronizedCommand

CommandStream -> CommandStreamPart
2021-05-21 16:39:22 +01:00
David EvansandJohannes Weiss 428b7b3488 Enable modifying IMAPClientHandler capabilities (#490)
* Add capabilities setting

* Tests

* Update Sources/NIOIMAP/Coders/IMAPClientHandler.swift

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>

* Fix non-sync literal test

* Use assert methods

* Fix test

* Sanity

* Enable changing capabilities

* Refactor to inout

* Switch to using IDs

* Default closure

* Soundness

* Fix rebase

* Re-add test

* Cleanup

* Soundness

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2021-04-06 15:04:14 +01:00
David Evans 94e3fb42f5 Update dependencies (#493)
* Update packages

* Run swift format

* Update
2021-03-23 17:21:41 +00:00
David Evans 1e43a90df4 Fix streaming FETCH responses (#496)
* Fix

* Soundness

* Discard read bytes

* Use clear and precondition
2021-03-22 14:28:26 +00:00
Daniel Eggert 15f642777a Remove expectGreeting. Don’t handle Greeting requirement in parser. (#362)
* Remove “expectGreeting”.

* Simplify nested types.
2020-11-12 23:47:58 +00:00
Daniel Eggert 3c20af6f53 Use encoding options specific to the transport direction. (#240)
* Use encoding options specific to the transport direction.

* Add description to precondition failure.

* Make properties on EncodingOptions public.

* Rename files.

* Change APPEND to use CommandEncodingOptions.
2020-07-06 18:37:16 +01:00
Johannes WeissandDavid Evans 525d58d1fa non-happy path tests: over/underflows (#220)
* Support encoding append commands

* Yay it works

* Cleanup 1

* Cleanup 2

* Fix sanity

* Fix command decoder test

* Fix parsing partial commands sync literals

* Fix parser stress tests

* Fix tests

* Remove unused code

* Code refactor and cleanup

* Fix sanity

Co-authored-by: David Evans <d.evans@apple.com>
2020-06-26 14:47:40 +01:00
David Evans 1a66129e86 Begin to make encoding capability aware (#188)
* Primitive capability support

* Sample move capability requirement

* More examples

* Write binary literals

* Sanity

* Rename to encoding options

* Fix sanity

* Fix

* Add IMAP base options

* Rename

* Update Capability.swift

* Fix

* Use EncodeBuffer

* Fix writing greeting

* Fix sanity

* Fix assert

* Use EncodeBuffers everywhere

* Use EncodingCapabilities

* Remove base capabilities

* Create CommandEncodeBuffer

* Dedicated buffer types

* Fix sanity

* Clear test buffer

* PR review changes

* Remove has more chunks

* Remove dead code

* Fix sanity

* Fix
2020-06-04 14:56:18 +01:00
David Evans a2ef4e92b1 Update proxy to use continuations (#162) 2020-05-27 13:31:30 +01:00
David Evans 28225ece7d Remove NIOIMAP namespace 2020-05-09 14:46:42 +01:00
tomer doron 53efab1d95 standardize format (#80)
motivation: use standard format across all of our projects

changes:
* add .swiftformat settings based on what we use in other projects
* validate format in the sanity script
* format
2020-04-24 12:05:17 +01:00
David Evans 818eda9e7c Fix compile (#67) 2020-04-20 15:40:00 +01:00
David Evans d7b4b5226d Rename ResponseStream to Response (#56)
* Rename ResponseStream to Response

* Fix conflicts
2020-04-17 18:25:17 +01:00
David EvansandCory Benfield 027494d589 Fix response streaming. (#4)
* Start response streaming

* Fix the tests

* It's fixed

* Fix parsing response data

* Fix typo

Co-Authored-By: Cory Benfield <lukasa@apple.com>

* Fix CLI

* Fix buffer

* Uncomment tests

* Uncomment tests

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-03-09 13:01:46 +00:00
David Evans c453000850 Initial project commit 2020-03-02 17:41:58 +00:00