zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.03k stars 592 forks source link

Improve metadata validation #117

Open bernardnormier opened 6 years ago

bernardnormier commented 6 years ago

There is currently not enough metadata validation in the Slice compilers.

pepone commented 4 years ago

While adding metadata validation to Slice to Swift compiler, noticed that Slice::Dictionary API doesn't allow to remove bogus metadata.

https://github.com/zeroc-ice/ice/blob/b0d4725aac41710d06078fc79f4a80d29209182c/cpp/src/Slice/Parser.h#L890-L891

This will be desirable to be able to sanitize the dictionary metadata like we do for other constructs.

I think we should come up with some kind of generic metadata validator that we can use everywhere, currently we are creating metadata visitors with each Slice compiler, but we don't have a consistent way to do the metada validation.