Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > db7a4a658d190b3e658423135710c498 > files > 614

ghc-darcs-devel-2.8.3-1.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Darcs.CommandsAux</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Darcs-CommandsAux.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Darcs-CommandsAux.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">darcs-2.8.3: a distributed, interactive, smart revision control system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Darcs.CommandsAux</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:checkPaths">checkPaths</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; [<a href="Darcs-Flags.html#t:DarcsFlag">DarcsFlag</a>] -&gt; <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:maliciousPatches">maliciousPatches</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; [<a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> p] -&gt; [<a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> p]</li><li class="src short"><a href="#v:hasMaliciousPath">hasMaliciousPath</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; p x y -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isMaliciousPath">isMaliciousPath</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isMaliciousSubPath">isMaliciousSubPath</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:checkPaths" class="def">checkPaths</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; [<a href="Darcs-Flags.html#t:DarcsFlag">DarcsFlag</a>] -&gt; <a href="Darcs-Witnesses-Ordered.html#t:FL">FL</a> p x y -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Darcs-CommandsAux.html#checkPaths" class="link">Source</a></p><div class="doc"><p>A convenience function to call from all darcs command functions before
  applying any patches. It checks for malicious paths in patches, and
  prints an error message and fails if it finds one.
</p></div></div><div class="top"><p class="src"><a name="v:maliciousPatches" class="def">maliciousPatches</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; [<a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> p] -&gt; [<a href="Darcs-Witnesses-Sealed.html#t:Sealed2">Sealed2</a> p]<a href="src/Darcs-CommandsAux.html#maliciousPatches" class="link">Source</a></p><div class="doc"><p>Filter out patches that contains some malicious file path
</p></div></div><div class="top"><p class="src"><a name="v:hasMaliciousPath" class="def">hasMaliciousPath</a> :: <a href="Darcs-Patch-Patchy.html#t:Patchy">Patchy</a> p =&gt; p x y -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Darcs-CommandsAux.html#hasMaliciousPath" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:isMaliciousPath" class="def">isMaliciousPath</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Darcs-CommandsAux.html#isMaliciousPath" class="link">Source</a></p><div class="doc"><p>What is a malicious path?
</p><p>A spoofed path is a malicious path.
</p><ol><li> Darcs only creates explicitly relative paths (beginning with <code>&quot;./&quot;</code>),
     so any not explicitly relative path is surely spoofed.
</li><li> Darcs normalizes paths so they never contain <code>&quot;/../&quot;</code>, so paths with
     <code>&quot;/../&quot;</code> are surely spoofed.
</li></ol><p>A path to a darcs repository's meta data can modify &quot;trusted&quot; patches or
  change safety defaults in that repository, so we check for paths
  containing <code>&quot;/_darcs/&quot;</code> which is the entry to darcs meta data.
</p><p>To do?
</p><ul><li> How about get repositories?
</li><li> Would it be worth adding a --semi-safe-paths option for allowing
    changes to certain preference files (_darcs/prefs/) in sub
    repositories'?
</li></ul></div></div><div class="top"><p class="src"><a name="v:isMaliciousSubPath" class="def">isMaliciousSubPath</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Darcs-CommandsAux.html#isMaliciousSubPath" class="link">Source</a></p><div class="doc"><p>Warning : this is less rigorous than isMaliciousPath
   but it's to allow for subpath representations that
   don't start with ./
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>