| | @@ -220,15 +220,16 @@ |
| 220 | 220 | Every message from client to server begins with one or more login |
| 221 | 221 | cards. Each login card has the following format: |
| 222 | 222 | |
| 223 | 223 | <pre><b>login</b> <i>userid nonce signature</i></pre> |
| 224 | 224 | |
| 225 | | -The userid is the name of the user that is requesting service |
| 226 | | -from the server. The nonce is the SHA1 hash of the remainder of |
| 227 | | -the message - all text that follows the newline character that |
| 228 | | -terminates the login card. The signature is the SHA1 hash of |
| 229 | | -the concatenation of the nonce and the users password. |
| 225 | +The userid is the name of the user that is requesting service from the |
| 226 | +server, encoded in "fossilized" form (exactly as described for <a |
| 227 | +href="#error">the error card</a>). The nonce is the SHA1 hash of the |
| 228 | +remainder of the message - all text that follows the newline character |
| 229 | +that terminates the login card. The signature is the SHA1 hash of the |
| 230 | +concatenation of the nonce and the users password. |
| 230 | 231 | |
| 231 | 232 | When receving a login card, the server looks up the user and verifies |
| 232 | 233 | that the nonce matches the SHA1 hash of the remainder of the message. |
| 233 | 234 | It then checks the signature hash to make sure the signature matches. |
| 234 | 235 | If everything checks out, then the client is granted all privileges of |
| | @@ -236,10 +237,25 @@ |
| 236 | 237 | |
| 237 | 238 | Only one login card is permitted. A second login card will trigger |
| 238 | 239 | a sync error. (Prior to 2025-07-21, the protocol permitted multiple |
| 239 | 240 | logins, treating the login as the union of all privileges from all |
| 240 | 241 | login cards. That capability was never used and has been removed.) |
| 242 | + |
| 243 | +As of version 2.27, Fossil supports transfering of the login card |
| 244 | +outside of the payload body, in one of the following ways: |
| 245 | + |
| 246 | +<ul> |
| 247 | +<li> URL parameter named "x-f-x-l". The value must be URL-encoded. |
| 248 | +<li> An HTTP header named "X-Fossil-Xfer-Login". The caveat for the |
| 249 | + header is that CGI-hosted fossils cannot see the headers. It |
| 250 | + works for standalone severs and those running via fossil's |
| 251 | + "test-http" mechanism. This approach is retained, despite the CGI |
| 252 | + disadvantage, because the URL parameter approach cannot be used |
| 253 | + to capture sync payload bodies for re-use with the "test-http" |
| 254 | + mechanism, a capability useful in testing. |
| 255 | +</ul> |
| 256 | + |
| 241 | 257 | |
| 242 | 258 | <h3 id="file">3.3 File Cards</h3> |
| 243 | 259 | |
| 244 | 260 | Artifacts are transferred using either "file" cards, or "cfile" |
| 245 | 261 | or "uvfile" cards. |
| 246 | 262 | |