Ignore IDN decoding errors.
[reddit.git] / LICENSE
blobbc55608de1c33d29b8dad89f3bd7ed8cc1541f48
1 reddit Inc.
3 Common Public Attribution License Version 1.0 (CPAL)
5 1. "Definitions"
7 1.0.1 "Commercial Use" means distribution or otherwise making the Covered Code
8     available to a third party.
10 1.1 "Contributor" means each entity that creates or contributes to the creation
11   of Modifications.
13 1.2 "Contributor Version" means the combination of the Original Code, prior
14   Modifications used by a Contributor, and the Modifications made by that
15   particular Contributor.
17 1.3 "Covered Code" means the Original Code or Modifications or the combination
18   of the Original Code and Modifications, in each case including portions
19   thereof.
21 1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted in
22   the software development community for the electronic transfer of data.
24 1.5 "Executable" means Covered Code in any form other than Source Code.
26 1.6 "Initial Developer" means the individual or entity identified as the Initial
27   Developer in the Source Code notice required by Exhibit A.
29 1.7 "Larger Work" means a work which combines Covered Code or portions thereof
30   with code not governed by the terms of this License.
32 1.8 "License" means this document.
34 1.8.1 "Licensable" means having the right to grant, to the maximum extent
35     possible, whether at the time of the initial grant or subsequently acquired,
36     any and all of the rights conveyed herein.
38 1.9 "Modifications" means any addition to or deletion from the substance or
39   structure of either the Original Code or any previous Modifications. When
40   Covered Code is released as a series of files, a Modification is:
42 A. Any addition to or deletion from the contents of a file containing Original
43 Code or previous Modifications.
45 B. Any new file that contains any part of the Original Code or previous
46 Modifications.
48 1.10 "Original Code" means Source Code of computer software code which is
49   described in the Source Code notice required by Exhibit A as Original Code,
50   and which, at the time of its release under this License is not already
51   Covered Code governed by this License.
53 1.10.1 "Patent Claims" means any patent claim(s), now owned or hereafter
54      acquired, including without limitation, method, process, and apparatus
55      claims, in any patent Licensable by grantor.
57 1.11 "Source Code" means the preferred form of the Covered Code for making
58   modifications to it, including all modules it contains, plus any associated
59   interface definition files, scripts used to control compilation and
60   installation of an Executable, or source code differential comparisons against
61   either the Original Code or another well known, available Covered Code of the
62   Contributor's choice. The Source Code can be in a compressed or archival form,
63   provided the appropriate decompression or de-archiving software is widely
64   available for no charge.
66 1.12 "You" (or "Your") means an individual or a legal entity exercising rights
67   under, and complying with all of the terms of, this License or a future
68   version of this License issued under Section 6.1. For legal entities, "You"
69   includes any entity which controls, is controlled by, or is under common
70   control with You. For purposes of this definition, "control" means (a) the
71   power, direct or indirect, to cause the direction or management of such
72   entity, whether by contract or otherwise, or (b) ownership of more than fifty
73   percent (50%) of the outstanding shares or beneficial ownership of such
74   entity.
76 2. Source Code License.
78 2.1 The Initial Developer Grant.
80 The Initial Developer hereby grants You a world-wide, royalty-free,
81 non-exclusive license, subject to third party intellectual property claims:
83 (a) under intellectual property rights (other than patent or trademark)
84 Licensable by Initial Developer to use, reproduce, modify, display, perform,
85 sublicense and distribute the Original Code (or portions thereof) with or
86 without Modifications, and/or as part of a Larger Work; and
88 (b) under Patents Claims infringed by the making, using or selling of Original
89 Code, to make, have made, use, practice, sell, and offer for sale, and/or
90 otherwise dispose of the Original Code (or portions thereof).
92 (c) the licenses granted in this Section 2.1(a) and (b) are effective on the
93 date Initial Developer first distributes Original Code under the terms of this
94 License.
96 (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for
97 code that You delete from the Original Code; 2) separate from the Original Code;
98 or 3) for infringements caused by: i) the modification of the Original Code or
99 ii) the combination of the Original Code with other software or devices.
101 2.2 Contributor Grant.
103 Subject to third party intellectual property claims, each Contributor hereby
104 grants You a world-wide, royalty-free, non-exclusive license
106 (a) under intellectual property rights (other than patent or trademark)
107 Licensable by Contributor, to use, reproduce, modify, display, perform,
108 sublicense and distribute the Modifications created by such Contributor (or
109 portions thereof) either on an unmodified basis, with other Modifications, as
110 Covered Code and/or as part of a Larger Work; and
112 (b) under Patent Claims infringed by the making, using, or selling of
113 Modifications made by that Contributor either alone and/or in combination with
114 its Contributor Version (or portions of such combination), to make, use, sell,
115 offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by
116 that Contributor (or portions thereof); and 2) the combination of Modifications
117 made by that Contributor with its Contributor Version (or portions of such
118 combination).
120 (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date
121 Contributor first makes Commercial Use of the Covered Code.
123 (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for
124 any code that Contributor has deleted from the Contributor Version; 2) separate
125 from the Contributor Version; 3) for infringements caused by: i) third party
126 modifications of Contributor Version or ii) the combination of Modifications
127 made by that Contributor with other software (except as part of the Contributor
128 Version) or other devices; or 4) under Patent Claims infringed by Covered Code
129 in the absence of Modifications made by that Contributor.
131 3. Distribution Obligations.
133 3.1 Application of License.
135 The Modifications which You create or to which You contribute are governed by
136 the terms of this License, including without limitation Section 2.2. The Source
137 Code version of Covered Code may be distributed only under the terms of this
138 License or a future version of this License released under Section 6.1, and You
139 must include a copy of this License with every copy of the Source Code You
140 distribute. You may not offer or impose any terms on any Source Code version
141 that alters or restricts the applicable version of this License or the
142 recipients' rights hereunder. However, You may include an additional document
143 offering the additional rights described in Section 3.5.
145 3.2 Availability of Source Code.
147 Any Modification which You create or to which You contribute must be made
148 available in Source Code form under the terms of this License either on the same
149 media as an Executable version or via an accepted Electronic Distribution
150 Mechanism to anyone to whom you made an Executable version available; and if
151 made available via Electronic Distribution Mechanism, must remain available for
152 at least twelve (12) months after the date it initially became available, or at
153 least six (6) months after a subsequent version of that particular Modification
154 has been made available to such recipients. You are responsible for ensuring
155 that the Source Code version remains available even if the Electronic
156 Distribution Mechanism is maintained by a third party.
158 3.3 Description of Modifications.
160 You must cause all Covered Code to which You contribute to contain a file
161 documenting the changes You made to create that Covered Code and the date of any
162 change. You must include a prominent statement that the Modification is derived,
163 directly or indirectly, from Original Code provided by the Initial Developer and
164 including the name of the Initial Developer in (a) the Source Code, and (b) in
165 any notice in an Executable version or related documentation in which You
166 describe the origin or ownership of the Covered Code.
168 3.4 Intellectual Property Matters
170 (a) Third Party Claims.
172 If Contributor has knowledge that a license under a third party's intellectual
173 property rights is required to exercise the rights granted by such Contributor
174 under Sections 2.1 or 2.2, Contributor must include a text file with the Source
175 Code distribution titled "LEGAL" which describes the claim and the party making
176 the claim in sufficient detail that a recipient will know whom to contact. If
177 Contributor obtains such knowledge after the Modification is made available as
178 described in Section 3.2, Contributor shall promptly modify the LEGAL file in
179 all copies Contributor makes available thereafter and shall take other steps
180 (such as notifying appropriate mailing lists or newsgroups) reasonably
181 calculated to inform those who received the Covered Code that new knowledge has
182 been obtained.
184 (b) Contributor APIs.
186 If Contributor's Modifications include an application programming interface and
187 Contributor has knowledge of patent licenses which are reasonably necessary to
188 implement that API, Contributor must also include this information in the LEGAL
189 file.
191 (c) Representations.
193 Contributor represents that, except as disclosed pursuant to Section 3.4(a)
194 above, Contributor believes that Contributor's Modifications are Contributor's
195 original creation(s) and/or Contributor has sufficient rights to grant the
196 rights conveyed by this License.
198 3.5 Required Notices.
200 You must duplicate the notice in Exhibit A in each file of the Source Code. If
201 it is not possible to put such notice in a particular Source Code file due to
202 its structure, then You must include such notice in a location (such as a
203 relevant directory) where a user would be likely to look for such a notice. If
204 You created one or more Modification(s) You may add your name as a Contributor
205 to the notice described in Exhibit A. You must also duplicate this License in
206 any documentation for the Source Code where You describe recipients' rights or
207 ownership rights relating to Covered Code. You may choose to offer, and to
208 charge a fee for, warranty, support, indemnity or liability obligations to one
209 or more recipients of Covered Code. However, You may do so only on Your own
210 behalf, and not on behalf of the Initial Developer or any Contributor. You must
211 make it absolutely clear than any such warranty, support, indemnity or liability
212 obligation is offered by You alone, and You hereby agree to indemnify the
213 Initial Developer and every Contributor for any liability incurred by the
214 Initial Developer or such Contributor as a result of warranty, support,
215 indemnity or liability terms You offer.
217 3.6 Distribution of Executable Versions.
219 You may distribute Covered Code in Executable form only if the requirements of
220 Section 3.1-3.5 have been met for that Covered Code, and if You include a notice
221 stating that the Source Code version of the Covered Code is available under the
222 terms of this License, including a description of how and where You have
223 fulfilled the obligations of Section 3.2. The notice must be conspicuously
224 included in any notice in an Executable version, related documentation or
225 collateral in which You describe recipients' rights relating to the Covered
226 Code. You may distribute the Executable version of Covered Code or ownership
227 rights under a license of Your choice, which may contain terms different from
228 this License, provided that You are in compliance with the terms of this License
229 and that the license for the Executable version does not attempt to limit or
230 alter the recipient's rights in the Source Code version from the rights set
231 forth in this License. If You distribute the Executable version under a
232 different license You must make it absolutely clear that any terms which differ
233 from this License are offered by You alone, not by the Initial Developer,
234 Original Developer or any Contributor. You hereby agree to indemnify the Initial
235 Developer, Original Developer and every Contributor for any liability incurred
236 by the Initial Developer, Original Developer or such Contributor as a result of
237 any such terms You offer.
239 3.7 Larger Works.
241 You may create a Larger Work by combining Covered Code with other code not
242 governed by the terms of this License and distribute the Larger Work as a single
243 product. In such a case, You must make sure the requirements of this License are
244 fulfilled for the Covered Code.
246 4. Inability to Comply Due to Statute or Regulation.
248 If it is impossible for You to comply with any of the terms of this License with
249 respect to some or all of the Covered Code due to statute, judicial order, or
250 regulation then You must: (a) comply with the terms of this License to the
251 maximum extent possible; and (b) describe the limitations and the code they
252 affect. Such description must be included in the LEGAL file described in Section
253 3.4 and must be included with all distributions of the Source Code. Except to
254 the extent prohibited by statute or regulation, such description must be
255 sufficiently detailed for a recipient of ordinary skill to be able to understand
258 5. Application of this License.
260 This License applies to code to which the Initial Developer has attached the
261 notice in Exhibit A and to related Covered Code.
263 6. Versions of the License.
265 6.1 New Versions.
267 reddit Inc. ("reddit") may publish revised and/or new versions of the
268 License from time to time. Each version will be given a distinguishing version
269 number.
271 6.2 Effect of New Versions.
273 Once Covered Code has been published under a particular version of the License,
274 You may always continue to use it under the terms of that version. You may also
275 choose to use such Covered Code under the terms of any subsequent version of the
276 License published by reddit. No one other than reddit has the right to
277 modify the terms applicable to Covered Code created under this License.
279 6.3 Derivative Works.
281 If You create or use a modified version of this License (which you may only do
282 in order to apply it to code which is not already Covered Code governed by this
283 License), You must (a) rename Your license so that the phrases "reddit",
284 "CPAL" or any confusingly similar phrase do not appear in your license (except
285 to note that your license differs from this License) and (b) otherwise make it
286 clear that Your version of the license contains terms which differ from the
287 CPAL. (Filling in the name of the Initial Developer, Original Developer,
288 Original Code or Contributor in the notice described in Exhibit A shall not of
289 themselves be deemed to be modifications of this License.)
291 7. DISCLAIMER OF WARRANTY.
293 COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT
294 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
295 LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE,
296 FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE
297 QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE
298 PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL
299 DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
300 REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART
301 OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
302 THIS DISCLAIMER.
304 8. TERMINATION.
306 8.1 This License and the rights granted hereunder will terminate automatically
307   if You fail to comply with terms herein and fail to cure such breach within 30
308   days of becoming aware of the breach. All sublicenses to the Covered Code
309   which are properly granted shall survive any termination of this
310   License. Provisions which, by their nature, must remain in effect beyond the
311   termination of this License shall survive.
313 8.2 If You initiate litigation by asserting a patent infringement claim
314   (excluding declatory judgment actions) against Initial Developer, Original
315   Developer or a Contributor (the Initial Developer, Original Developer or
316   Contributor against whom You file such action is referred to as "Participant")
317   alleging that:
319 (a) such Participant's Contributor Version directly or indirectly infringes any
320 patent, then any and all rights granted by such Participant to You under
321 Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from
322 Participant terminate prospectively, unless if within 60 days after receipt of
323 notice You either: (i) agree in writing to pay Participant a mutually agreeable
324 reasonable royalty for Your past and future use of Modifications made by such
325 Participant, or (ii) withdraw Your litigation claim with respect to the
326 Contributor Version against such Participant. If within 60 days of notice, a
327 reasonable royalty and payment arrangement are not mutually agreed upon in
328 writing by the parties or the litigation claim is not withdrawn, the rights
329 granted by Participant to You under Sections 2.1 and/or 2.2 automatically
330 terminate at the expiration of the 60 day notice period specified above.
332 (b) any software, hardware, or device, other than such Participant's Contributor
333 Version, directly or indirectly infringes any patent, then any rights granted to
334 You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective
335 as of the date You first made, used, sold, distributed, or had made,
336 Modifications made by that Participant.
338 8.3 If You assert a patent infringement claim against Participant alleging that
339   such Participant's Contributor Version directly or indirectly infringes any
340   patent where such claim is resolved (such as by license or settlement) prior
341   to the initiation of patent infringement litigation, then the reasonable value
342   of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be
343   taken into account in determining the amount or value of any payment or
344   license.
346 8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user
347   license agreements (excluding distributors and resellers) which have been
348   validly granted by You or any distributor hereunder prior to termination shall
349   survive termination.
351 9. LIMITATION OF LIABILITY.
353 UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
354 NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL
355 DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY
356 SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT,
357 SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING,
358 WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
359 FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN
360 IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS
361 LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
362 INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
363 PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
364 LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND
365 LIMITATION MAY NOT APPLY TO YOU.
367 10. U.S. GOVERNMENT END USERS.
369 The Covered Code is a "commercial item," as that term is defined in 48
370 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and
371 "commercial computer software documentation," as such terms are used in 48
372 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
373 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users
374 acquire Covered Code with only those rights set forth herein.
376 11. MISCELLANEOUS.
378 This License represents the complete agreement concerning subject matter
379 hereof. If any provision of this License is held to be unenforceable, such
380 provision shall be reformed only to the extent necessary to make it
381 enforceable. This License shall be governed by California law provisions (except
382 to the extent applicable law, if any, provides otherwise), excluding its
383 conflict-of-law provisions. With respect to disputes in which at least one party
384 is a citizen of, or an entity chartered or registered to do business in the
385 United States of America, any litigation relating to this License shall be
386 subject to the jurisdiction of the Federal Courts of the Northern District of
387 California, with venue lying in Santa Clara County, California, with the losing
388 party responsible for costs, including without limitation, court costs and
389 reasonable attorneys' fees and expenses. The application of the United Nations
390 Convention on Contracts for the International Sale of Goods is expressly
391 excluded. Any law or regulation which provides that the language of a contract
392 shall be construed against the drafter shall not apply to this License.
394 12. RESPONSIBILITY FOR CLAIMS.
396 As between Initial Developer, Original Developer and the Contributors, each
397 party is responsible for claims and damages arising, directly or indirectly, out
398 of its utilization of rights under this License and You agree to work with
399 Initial Developer, Original Developer and Contributors to distribute such
400 responsibility on an equitable basis. Nothing herein is intended or shall be
401 deemed to constitute any admission of liability.
403 13. MULTIPLE-LICENSED CODE.
405 Initial Developer may designate portions of the Covered Code as
406 Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits
407 you to utilize portions of the Covered Code under Your choice of the CPAL or the
408 alternative licenses, if any, specified by the Initial Developer in the file
409 described in Exhibit A.
411 14. ADDITIONAL TERM: ATTRIBUTION
413 (a) As a modest attribution to the organizer of the development of the Original
414 Code ("Original Developer"), in the hope that its promotional value may help
415 justify the time, money and effort invested in writing the Original Code, the
416 Original Developer may include in Exhibit B ("Attribution Information") a
417 requirement that each time an Executable and Source Code or a Larger Work is
418 launched or initially run (which includes initiating a session), a prominent
419 display of the Original Developer's Attribution Information (as defined below)
420 must occur on the graphic user interface employed by the end user to access such
421 Covered Code (which may include display on a splash screen), if any. The size of
422 the graphic image should be consistent with the size of the other elements of
423 the Attribution Information. If the access by the end user to the Executable and
424 Source Code does not create a graphic user interface for access to the Covered
425 Code, this obligation shall not apply. If the Original Code displays such
426 Attribution Information in a particular form (such as in the form of a splash
427 screen, notice at login, an "about" display, or dedicated attribution area on
428 user interface screens), continued use of such form for that Attribution
429 Information is one way of meeting this requirement for notice.
431 (b) Attribution information may only include a copyright notice, a brief phrase,
432 graphic image and a URL ("Attribution Information") and is subject to the
433 Attribution Limits as defined below. For these purposes, prominent shall mean
434 display for sufficient duration to give reasonable notice to the user of the
435 identity of the Original Developer and that if You include Attribution
436 Information or similar information for other parties, You must ensure that the
437 Attribution Information for the Original Developer shall be no less prominent
438 than such Attribution Information or similar information for the other
439 party. For greater certainty, the Original Developer may choose to specify in
440 Exhibit B below that the above attribution requirement only applies to an
441 Executable and Source Code resulting from the Original Code or any Modification,
442 but not a Larger Work. The intent is to provide for reasonably modest
443 attribution, therefore the Original Developer cannot require that You display,
444 at any time, more than the following information as Attribution Information: (a)
445 a copyright notice including the name of the Original Developer; (b) a word or
446 one phrase (not exceeding 10 words); (c) one graphic image provided by the
447 Original Developer; and (d) a URL (collectively, the "Attribution Limits").
449 (c) If Exhibit B does not include any Attribution Information, then there are no
450 requirements for You to display any Attribution Information of the Original
451 Developer.
453 (d) You acknowledge that all trademarks, service marks and/or trade names
454 contained within the Attribution Information distributed with the Covered Code
455 are the exclusive property of their owners and may only be used with the
456 permission of their owners, or under circumstances otherwise permitted by law or
457 as expressly set out in this License.
459 15. ADDITIONAL TERM: NETWORK USE.
461 The term "External Deployment" means the use, distribution, or communication of
462 the Original Code or Modifications in any way such that the Original Code or
463 Modifications may be used by anyone other than You, whether those works are
464 distributed or communicated to those persons or made available as an application
465 intended for use over a network. As an express condition for the grants of
466 license hereunder, You must treat any External Deployment by You of the Original
467 Code or Modifications as a distribution under section 3.1 and make Source Code
468 available under Section 3.2.
470 EXHIBIT A. Common Public Attribution License Version 1.0.
472 "The contents of this file are subject to the Common Public Attribution License
473 Version 1.0. (the "License"); you may not use this file except in compliance
474 with the License. You may obtain a copy of the License at
475 http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
476 License Version 1.1, but Sections 14 and 15 have been added to cover use of
477 software over a computer network and provide for limited attribution for the
478 Original Developer. In addition, Exhibit A has been modified to be consistent
479 with Exhibit B.
481 Software distributed under the License is distributed on an "AS IS" basis,
482 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
483 specific language governing rights and limitations under the License.
485 The Original Code is reddit.
487 The Original Developer is the Initial Developer.  The Initial Developer of the
488 Original Code is reddit Inc.
490 All portions of the code written by reddit are Copyright (c) 2006-2015
491 reddit Inc. All Rights Reserved.
493 EXHIBIT B. Attribution Information
495 Attribution Copyright Notice: Copyright (c) 2006-2015 reddit Inc. All Rights
496 Reserved.
498 Attribution Phrase (not exceeding 10 words): Powered by reddit
500 Attribution URL: http://code.reddit.com
502 Graphic Image as provided in the Covered Code:
503 http://code.reddit.com/reddit_logo.png
505 Display of Attribution Information is required in Larger Works which are defined
506 in the CPAL as a work which combines Covered Code or portions thereof with code
507 not governed by the terms of the CPAL.