From 39f7e76ba90b5134346d31095b31b969047b0f6a Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 10 Apr 2023 08:42:35 +1000 Subject: [PATCH 01/32] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 37 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..0ed68f86 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Logs** +If applicable, add text or screenshots of the logs to help explain your problem. + +**Server (please complete the following information):** + - OS: [e.g. iOS] + - PHP Version: [e.g. 8.2] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Mail App [e.g. GMail, Apple Mail] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 136554336e42e3d78ef51d0ecfd8efd251e88d07 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 15 May 2023 11:19:53 +1000 Subject: [PATCH 02/32] add and modify project text files --- CODE_OF_CONDUCT.md | 78 +++++ CONTRIBUTING.md | 36 ++- LICENSE | 696 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +- SECURITY.md | 18 ++ TRADEMARKS | 169 +++++++++++ 6 files changed, 997 insertions(+), 4 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 LICENSE create mode 100644 SECURITY.md create mode 100644 TRADEMARKS diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..37993881 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,78 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at https://github.com/Z-Hub/Z-Push/discussions. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba8d7574..37ffab07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,35 @@ -# How to contribute to Z-Push +# Contributing -Please see the [Z-Push Wiki](https://wiki.z-hub.io/display/ZP/Development+guidelines) for contribution information. \ No newline at end of file +Mail-in-a-Box is an open source project. Your contributions and pull requests +are welcome. + +Please submit all Pull Requests and issues through the Github repo https://github.com/Z-Hub/Z-Push + + +## GNU Affero General Public License, version 3 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License, version 3, +as published by the Free Software Foundation. Consult [LICENSE](LICENSE) file +for details. + +All contributions to this project must be released under the GNU Affero General +Public License, version 3 (AGPLv3). By submitting a pull request or patch, you +are agreeing to release your contribution under the GNU Affero General Public +License, version 3 (AGPLv3). + +### Releasing contributions + +There is a need to document that contributors understand the above. + +All contributors must explicitly and publicly release their code under AGPLv3 at +least once with one of the following statments: + +* Released under the GNU Affero General Public License (AGPL), version 3. +* Released under the GNU Affero General Public License (AGPL), version 3 and Trademark Additional Terms. + + +## Code of Conduct + +This project has a [Code of Conduct](CODE_OF_CONDUCT.md). Please review it when +joining our community. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..2cd4e92a --- /dev/null +++ b/LICENSE @@ -0,0 +1,696 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. + + +--- + +Copyright 2007 - 2016 Zarafa Deutschland GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License, version 3, +as published by the Free Software Foundation with the following additional +term according to sec. 7: + +According to sec. 7 of the GNU Affero General Public License, version 3, +the terms of the AGPL are supplemented with the following terms: + +"Zarafa" is a registered trademark of Zarafa B.V. +"Z-Push" is a registered trademark of Zarafa Deutschland GmbH +The licensing of the Program under the AGPL does not imply a trademark license. +Therefore any rights, title and interest in our trademarks remain entirely with us. + +Our trademark policy (see TRADEMARKS) allows you to use our trademarks +in connection with Propagation and certain other acts regarding the Program. +In any case, if you propagate an unmodified version of the Program you are +allowed to use the term "Z-Push" to indicate that you distribute the Program. +Furthermore you may use our trademarks where it is necessary to indicate the +intended purpose of a product or service provided you use it in accordance +with honest business practices. For questions please contact Zarafa at +trademark@zarafa.com. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/README.md b/README.md index 1ef74361..46d74542 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Z-Push Z-Push is an open-source application to synchronize ActiveSync compatible devices such as mobile phones, tablets and Outlook 2013 and above. With a history of almost 10 years of successful synchronization with multiple backends Z-Push is the leading open source push synchronization. -Z-Push can be easily installed using our package repositories, see the [install instructions](https://kb.kopano.io/display/ZP/Installation) for more information. +Z-Push can be easily installed using our package repositories, see the [install instructions](https://github.com/Z-Hub/Z-Push/wiki/Installation) for more information. # Contributing -Please see the [Z-Push Wiki](https://kb.kopano.io/display/ZP/Development+guidelines) for contribution information. +Please see the [CONTRIBUTING](CONTRIBUTING.md) file for contribution information. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..1a53e0c9 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,18 @@ +# Security Policy + +## Supported Versions + +The following versions are currently supported for security patches: + +| Version | Supported | +| ------- | ------------------ | +| 2.7.x | :white_check_mark: | +| 2.6.x | :white_check_mark: | +| < 2.6 | :x: | + +## Reporting a Vulnerability + +Please report (suspected) security vulnerabilities at +https://github.com/Z-Hub/Z-Push/discussions. You will receive a response from +us within 48 hours. If the issue is confirmed, we will release a patch as soon +as possible depending on complexity. diff --git a/TRADEMARKS b/TRADEMARKS new file mode 100644 index 00000000..c1cde449 --- /dev/null +++ b/TRADEMARKS @@ -0,0 +1,169 @@ +Z-Push Trademark Policy + + +The word mark "Z-PUSH" (United States registered trademark 4196338) is owned +by Zarafa BV of the Netherlands. Under certain laws, Zarafa also may have +unregistered common law rights to this mark. We (Zarafa) use this mark to +promote and market this software (Z-Push). With regards to using this mark, +we provide the following trademark license. + + +Introduction + +As we wish to encourage adoption of this software by the free software +community, we have drafted this trademark policy to ensure trademark law does +not block legitimate use of the software or the mark we apply to the software. +We have based our policy on the policy of The Document Foundation. + +Our goal is to encourage widespread use of our mark by the community while +controlling that use in order to avoid confusion on the part of software users +and the general public, to maintain the value of the image and reputation of +the mark and to protect it from inappropriate or unauthorized use. + +Any potential interpretation of this policy that contradicts this goal should be +regarded as a bug. Please let us know so we can fix this policy. The same +applies if a scenario exists in which the intended use of our mark is not +covered. We welcome your feedback. + + +General requirements + +Our policy must balance two competing interests: we need to ensure that our +mark remains a reliable indicator of quality, source, and security; and we +desire to permit all community members, software distributors, and others with +whom we work to discuss our products and to accurately describe their +affiliation with us. In creating our mark policy, we seek to clarify the uses +of our Z-Push mark we consider legitimate and the uses we do not. + +Our general requirements are that your use of our mark be non-confusing and +non-disparaging. + +By non-confusing, we mean that people should always know whom they are dealing +with, and where the software they are downloading comes from. Websites and +software that are not created or produced by Z-Push should not imply, either +directly or by omission, that they are. For example, such an implication may +arise if a website or software bears no names or mark other than ours, or uses +our mark as the vastly most prominent name. + +By non-disparaging, we mean that, outside the bounds of fair use and similar +exceptions in copyright, trademark and related laws, you cannot use our mark +as a vehicle for defaming us or sullying our reputation. + + +Specific permitted and non-permitted uses + +You may use our mark without prior written permission (subject to the +following terms) for the following purposes: + + 1. To refer to the Z-Push software in substantially unmodified form. + "Substantially unmodified" means built from the source code provided by + the Z-Push project, possibly with minor modifications including but not + limited to: the enabling or disabling of certain features by default, + translations into other languages, changes required for compatibility with + a particular operating system distribution, the inclusion of bug-fix + patches, or the bundling of additional fonts, templates, artwork and + extensions. + + 2. To identify Z-Push as a distinct component of a software offering. + + 3. To factually refer to Z-Push itself, its products or its services. + + 4. To identify Z-Push as a dependency or necessary component of other software, + + 5. When referring to Z-Push software that is not substantially unmodified, + to say that such software is a "derivative of" or "based on" Z-Push. + + 6. More generally, to comply with any requirement of the GNU Affero GPL + version 3. + + 7. As part of the name of a product or service designed to work with Z-Push, + e.g. as in "Bob's add-ons for Z-Push" or "Bob's forum for Z-Push users", + so long as the name as a whole (via its other components) clearly and + unambiguously distinguishes the product from Z-Push, and the general + presentation of the product does not imply any official association or + identity with Z-Push. + +You may not use our mark in the following ways: + + 1. In any way likely to cause confusion as to the identity of Z-Push, the + origin of its software, or the software's license; + + 2. In any way that indicates a greater degree of association between you + and Z-Push than actually exists; + + 3. In any way that implies a designated successor to our software (e.g., + "Z-Push++" or "Z-Push 2020" are not permitted). + + 4. In any way that indicates that Z-Push favors one distribution, platform, + product, etc. over another. + + +Additional requirements for marketing + +We encourage the use of our mark in marketing, and other publicity materials +related to Z-Push. Of course, any use of our mark is subject to the overarching +requirement that its use be non-confusing. + +We have three specific requirements: + + 1. Proper Form: Our mark should be used in its exact form, neither + abbreviated nor combined with any other word or words. For the logo, you + can download copies in various formats on our website. + + 2. Symbol: If reasonably possible, the first or most prominent mention of + our registered Z-Push mark should be accompanied by a symbol indicating + that the mark is a registered trademark ("®"). + + 3. Distinguishable: In at least the first reference, the mark should be set + apart from surrounding text, either by capitalizing it or by italicizing, + bolding or underlining it. In addition, a website may not copy the look + and feel of our websites. We do not want the visitor to your websites + to be confused about which entity he/she is dealing with. + +The second and third requirements are waived in all contexts where such a mark +is not normally included: email, on-line discussion, non-graphical +advertisements (when permitted), and academic papers. We encourage the use of +the symbol whenever possible, but recognize that many non-commercial and +informal uses will omit it. + + +Additional requirements for merchandise using our mark + +You may create and sell merchandise using the Z-Push mark without additional +permission provided that you use only unmodified graphics from the logo page on +our website. Please contact us if you would like to sell any other merchandise +containing the Z-Push mark. + + +Additional requirements for services related to our software + +If you offer services primarily related to our software (such as support), you +may use our mark in describing and advertising your services relating to one +of our products, so long as you do not violate the guidelines for the use of +our mark or do anything that might mislead customers into thinking that either +your website, service, or product is an official Z-Push website, service, or +product, or that Z-Push has any direct relationship with your organization. + + +Miscellaneous provisions + +We reserve the right to: + + 1. Determine compliance with this policy. + + 2. Modify this policy in ways consistent with its mission of protecting the + public, the community and the users, but always within the goal + mentioned above. + + 3. Grant exceptions to this policy, of any kind and for any reason + whatsoever, other clauses notwithstanding. + + +If you have questions about using our mark, or if you think you should be able +to use our mark for any purpose not allowed by this policy and would like +permission for that use, or for more information concerning our label program, +please contact us by emailing trademarks@zarafa.com (non-public). + +This document is released under the the Creative Commons Attribution-ShareAlike +3.0 Unported License. It is based on work by The Document Foundation at +https://wiki.documentfoundation.org/TradeMark_Policy. From 2477d5abeaac5959e2f2f2d1c6b3dbcbfe910333 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 15 May 2023 12:11:52 +1000 Subject: [PATCH 03/32] Create PULL_REQUEST_TEMPLATE.md Created template with optional information --- .github/PULL_REQUEST_TEMPLATE.md | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..2992f620 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,37 @@ + + +What does this implement/fix? Explain your changes. +--------------------------------------------------- +... + + +Does this close any currently open issues? +------------------------------------------ +... + + +Any relevant logs, error output, etc? +------------------------------------- +... + + +Where has this been tested? +--------------------------- +**Server (please complete the following information):** + - OS: [e.g. iOS] + - PHP Version: [e.g. 8.2] + - Backend for: [e.g. Kopano, Zimbra, Mail-in-a-Box] + - and Version: [e.g. git, 9.0, v61.1] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Mail App [e.g. GMail, Apple Mail] + - Version [e.g. 22] + +Release under AGPLv3 +--------------------------- + + + + From 2b5124b1acd0c5708ed904f19a917b0c16108ff7 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 15 May 2023 12:13:34 +1000 Subject: [PATCH 04/32] Update bug_report.md Additional server info for backend --- .github/ISSUE_TEMPLATE/bug_report.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0ed68f86..516d47bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,12 +1,3 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - **Describe the bug** A clear and concise description of what the bug is. @@ -26,6 +17,8 @@ If applicable, add text or screenshots of the logs to help explain your problem. **Server (please complete the following information):** - OS: [e.g. iOS] - PHP Version: [e.g. 8.2] + - Backend for: [e.g. Kopano, Zimbra, Mail-in-a-Box] + - and Version: [e.g. git, 9.0, v61.1] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] From ffad63a628e0c7964bcf7e5486e2521088aa7728 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 15 May 2023 12:18:30 +1000 Subject: [PATCH 05/32] Update PULL_REQUEST_TEMPLATE.md Move AGPLv3 release comments --- .github/PULL_REQUEST_TEMPLATE.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2992f620..37811cf3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,6 @@ + + + What does this implement/fix? Explain your changes. @@ -28,10 +31,3 @@ Where has this been tested? - OS: [e.g. iOS8.1] - Mail App [e.g. GMail, Apple Mail] - Version [e.g. 22] - -Release under AGPLv3 ---------------------------- - - - - From d76a9ab293f6c95aa86a86149616e129ce4437d6 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 17 May 2023 18:10:37 +1000 Subject: [PATCH 06/32] Check if $message returns false Released under the GNU Affero General Public License (AGPL), version 3. --- src/lib/default/diffbackend/exportchangesdiff.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/default/diffbackend/exportchangesdiff.php b/src/lib/default/diffbackend/exportchangesdiff.php index ed2cc08d..112d6249 100644 --- a/src/lib/default/diffbackend/exportchangesdiff.php +++ b/src/lib/default/diffbackend/exportchangesdiff.php @@ -160,7 +160,8 @@ public function Synchronize() { $message = $this->backend->GetMessage($this->folderid, $change["id"], $this->contentparameters); // copy the flag to the message - $message->flags = (isset($change["flags"])) ? $change["flags"] : 0; + if($message) + $message->flags = (isset($change["flags"])) ? $change["flags"] : 0; if($stat && $message) { if($this->flags & BACKEND_DISCARD_DATA || $this->importer->ImportMessageChange($change["id"], $message) == true) From 0b278c36a0c0996d1a12801052d6c864165bd452 Mon Sep 17 00:00:00 2001 From: liverpoolfcfan <2759714+liverpoolfc-fan@users.noreply.github.com> Date: Mon, 29 May 2023 11:42:43 +0100 Subject: [PATCH 07/32] Update z-push-top.php The max value for PIDs on 64-bit linux is 2^22 (approx 4 million) so 7 characters are needed to display the column reliably. Released under the GNU Affero General Public License (AGPL), version 3 --- src/z-push-top.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/z-push-top.php b/src/z-push-top.php index 1494896d..9cdf241e 100755 --- a/src/z-push-top.php +++ b/src/z-push-top.php @@ -80,6 +80,7 @@ class ZPushTop { const SHOW_ACTIVE_ONLY = 1; const SHOW_UNKNOWN_ONLY = 2; const SHOW_TERM_DEFAULT_TIME = 5; // 5 secs + const SHOW_PID_CHARS = 7; //The PID_MAX_LIMIT can be set to any value up to 2^22 (approximately 4 million) private $topCollector; private $starttime; @@ -666,10 +667,10 @@ private function scrAsBold($text) { */ private function getLine($l) { if ($this->wide === true) - return sprintf("%s%s%s%s%s%s%s%s", $this->ptStr($l['pid'],6), $this->ptStr($l['ip'],16), $this->ptStr($l['user'],24), $this->ptStr($l['command'],16), $this->ptStr($this->sec2min($l['time']),8), $this->ptStr($l['devagent'],28), $this->ptStr($l['devid'],33, true), $l['addinfo']); + return sprintf("%s%s%s%s%s%s%s%s", $this->ptStr($l['pid'],self::SHOW_PID_CHARS+1), $this->ptStr($l['ip'],16), $this->ptStr($l['user'],24), $this->ptStr($l['command'],16), $this->ptStr($this->sec2min($l['time']),8), $this->ptStr($l['devagent'],28), $this->ptStr($l['devid'],33, true), $l['addinfo']); else - return sprintf("%s%s%s%s%s%s%s%s", $this->ptStr($l['pid'],6), $this->ptStr($l['ip'],16), $this->ptStr($l['user'],8), $this->ptStr($l['command'],8), $this->ptStr($this->sec2min($l['time']),6), $this->ptStr($l['devagent'],20), $this->ptStr($l['devid'],12, true), $l['addinfo']); - } + return sprintf("%s%s%s%s%s%s%s%s", $this->ptStr($l['pid'],self::SHOW_PID_CHARS+1), $this->ptStr($l['ip'],16), $this->ptStr($l['user'],8), $this->ptStr($l['command'],8), $this->ptStr($this->sec2min($l['time']),6), $this->ptStr($l['devagent'],20), $this->ptStr($l['devid'],12, true), $l['addinfo']); + } /** * Pads and trims string From 87667958978c8b119269abd3ef88bbfc6b8a8436 Mon Sep 17 00:00:00 2001 From: liverpoolfcfan <2759714+liverpoolfc-fan@users.noreply.github.com> Date: Tue, 30 May 2023 10:35:42 +0100 Subject: [PATCH 08/32] Replace deprecated gmstrftime PHP function gmstrftime - Warning: This function has been DEPRECATED as of PHP 8.1.0. Relying on this function is highly discouraged. Adding a new static function to Utils.php to generate the the required Compact Date strings to send to the device. --- src/backend/kopano/mapiprovider.php | 6 +++--- src/lib/core/streamer.php | 4 ++-- src/lib/syncobjects/syncappointment.php | 4 ++-- src/lib/utils/utils.php | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/backend/kopano/mapiprovider.php b/src/backend/kopano/mapiprovider.php index c3d2701b..9a927e46 100644 --- a/src/backend/kopano/mapiprovider.php +++ b/src/backend/kopano/mapiprovider.php @@ -1286,12 +1286,12 @@ private function setAppointment($mapimessage, $appointment) { if (isset($existingstartendprops[$amapping["starttime"]]) && !isset($appointment->starttime)) { $appointment->starttime = $existingstartendprops[$amapping["starttime"]]; - ZLog::Write(LOGLEVEL_WBXML, sprintf("MAPIProvider->setAppointment(): Parameter 'starttime' was not set, using value from MAPI %d (%s).", $appointment->starttime, gmstrftime("%Y%m%dT%H%M%SZ", $appointment->starttime))); + ZLog::Write(LOGLEVEL_WBXML, sprintf("MAPIProvider->setAppointment(): Parameter 'starttime' was not set, using value from MAPI %d (%s).", $appointment->starttime, Utils::FormatDateUtc($appointment->starttime,"yyyyMMdd'T'HHmmSS'Z'"))); } if (isset($existingstartendprops[$amapping["endtime"]]) && !isset($appointment->endtime)) { $appointment->endtime = $existingstartendprops[$amapping["endtime"]]; - ZLog::Write(LOGLEVEL_WBXML, sprintf("MAPIProvider->setAppointment(): Parameter 'endtime' was not set, using value from MAPI %d (%s).", $appointment->endtime, gmstrftime("%Y%m%dT%H%M%SZ", $appointment->endtime))); - } + ZLog::Write(LOGLEVEL_WBXML, sprintf("MAPIProvider->setAppointment(): Parameter 'endtime' was not set, using value from MAPI %d (%s).", $appointment->endtime, Utils::FormatDateUtc($appointment->endtime,"yyyyMMdd'T'HHmmSS'Z'"))); + } } if (!isset($appointment->starttime) || !isset($appointment->endtime)) { throw new StatusException("MAPIProvider->setAppointment(): Error, start and/or end time not set and can not be retrieved from MAPI.", SYNC_STATUS_SYNCCANNOTBECOMPLETED); diff --git a/src/lib/core/streamer.php b/src/lib/core/streamer.php index df143006..6053abbd 100644 --- a/src/lib/core/streamer.php +++ b/src/lib/core/streamer.php @@ -462,9 +462,9 @@ private function formatDate($ts, $type) { } if($type == self::STREAMER_TYPE_DATE) - return gmstrftime("%Y%m%dT%H%M%SZ", $ts); + return Utils::FormatDateUtc($ts,"yyyyMMdd'T'HHmmSS'Z'"); else if($type == self::STREAMER_TYPE_DATE_DASHES) - return gmstrftime("%Y-%m-%dT%H:%M:%S.000Z", $ts); + return Utils::FormatDateUtc($ts,"yyyy-MM-dd'T'HH:mm:SS'.000Z'"); } /** diff --git a/src/lib/syncobjects/syncappointment.php b/src/lib/syncobjects/syncappointment.php index b4b27808..5004b474 100644 --- a/src/lib/syncobjects/syncappointment.php +++ b/src/lib/syncobjects/syncappointment.php @@ -266,12 +266,12 @@ public function Check($logAsDebug = false) { // Case 1, 3a (endtime won't be changed as it's set) if (!isset($this->starttime)) { $this->starttime = $calcstart; - ZLog::Write(LOGLEVEL_WBXML, sprintf("SyncAppointment->Check(): Parameter 'starttime' was not set, setting it to %d (%s).", $this->starttime, gmstrftime("%Y%m%dT%H%M%SZ", $this->starttime))); + ZLog::Write(LOGLEVEL_WBXML, sprintf("SyncAppointment->Check(): Parameter 'starttime' was not set, setting it to %d (%s).", $this->starttime, Utils::FormatDateUtc($this->starttime,"yyyyMMdd'T'HHmmSS'Z'"))); } // Case 1, 4 if (!isset($this->endtime)) { $this->endtime = $calcstart + 1800; // 30 min after calcstart - ZLog::Write(LOGLEVEL_WBXML, sprintf("SyncAppointment->Check(): Parameter 'endtime' was not set, setting it to %d (%s).", $this->endtime, gmstrftime("%Y%m%dT%H%M%SZ", $this->endtime))); + ZLog::Write(LOGLEVEL_WBXML, sprintf("SyncAppointment->Check(): Parameter 'endtime' was not set, setting it to %d (%s).", $this->endtime, Utils::FormatDateUtc($this->endtime,"yyyyMMdd'T'HHmmSS'Z'"))); } } diff --git a/src/lib/utils/utils.php b/src/lib/utils/utils.php index f0622cf8..e6826f75 100644 --- a/src/lib/utils/utils.php +++ b/src/lib/utils/utils.php @@ -1465,6 +1465,30 @@ public static function SafeGetContents($filename, $functName, $suppressWarnings, return $contents; } + + /** + * Creates a Compact DateTime from a UTC Timestamp - Formats used for ActiveSync yyyyMMddTHHmmSSZ and yyyy-MM-ddTHH:mm:SS.000Z + * + * @param timestamp $ts + * + * @param string $format + * + * @access public + * @return string + */ + public static function FormatDateUtc($ts,$format) { + + $dateFormatUtc = datefmt_create( + 'en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'UTC', + IntlDateFormatter::GREGORIAN, + $format + ); + return datefmt_format($dateFormatUtc, $ts); + } + } // TODO Win1252/UTF8 functions are deprecated and will be removed sometime From bcdb0c8211693ef724f782ecf2012932e2319860 Mon Sep 17 00:00:00 2001 From: liverpoolfcfan <2759714+liverpoolfc-fan@users.noreply.github.com> Date: Tue, 30 May 2023 16:04:14 +0100 Subject: [PATCH 09/32] Return empty string instead of setting it to null (#1) PHP 8.0 stopped allowing empty strings to be passed to gmstrftime. This led to the previously suggested change to replace the empty string with null. Unfortunately, that change collided with the gmstrftime also accepting null as a valid input where it would return the current time formatted as requested. This led to contacts who had empty Anniversary and Birthday fields getting their empty strings replaced by nulls, and subsequently getting passed to gmstrftime which would assign them values of the current time. The correct behaviour for the streamer in this instance is to just return the empty string --- src/lib/core/streamer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/streamer.php b/src/lib/core/streamer.php index 6053abbd..f4f4ea83 100644 --- a/src/lib/core/streamer.php +++ b/src/lib/core/streamer.php @@ -458,7 +458,7 @@ public function GetStreamerVars() { */ private function formatDate($ts, $type) { if ('' === $ts) { - $ts = null; + return $ts; } if($type == self::STREAMER_TYPE_DATE) From fc62b3d7692be635532d0a162f84e3c66d71a75e Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 16:22:26 +1000 Subject: [PATCH 10/32] Update version.php To include version when not coming from a git clone. such as Mail in a boxes use. Need a text file named version in the same directory as version.php --- src/version.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/version.php b/src/version.php index 67814363..3c03528e 100644 --- a/src/version.php +++ b/src/version.php @@ -27,9 +27,14 @@ $path = escapeshellarg(dirname(realpath($_SERVER['SCRIPT_FILENAME']))); $branch = trim(exec("hash git 2>/dev/null && cd $path >/dev/null 2>&1 && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e \"s/* \(.*\)/\\1/\"")); $version = exec("hash git 2>/dev/null && cd $path >/dev/null 2>&1 && git describe --always 2>/dev/null"); + $file = dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/version'; if ($branch && $version) { define("ZPUSH_VERSION", $branch .'-'. $version); } + elseif (file_exists($file)) { + $line = fgets(fopen($file, 'r')); + define("ZPUSH_VERSION", $line); + } else { define("ZPUSH_VERSION", "GIT"); } From 33ce4d54cc908313e748c1c955c851f7da9363ce Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 16:38:06 +1000 Subject: [PATCH 11/32] Add Psalm workflow action --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..b17e7c95 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,2 @@ +- name: Psalm – Security Scanner for PHP + uses: psalm/psalm-github-security-scan@1.2.1 From 97da6c2031e1ff95c1cc9c424887b058f00fdfe9 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 16:40:37 +1000 Subject: [PATCH 12/32] Update main.yml --- .github/workflows/main.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b17e7c95..f9b5daf3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,2 +1,19 @@ -- name: Psalm – Security Scanner for PHP - uses: psalm/psalm-github-security-scan@1.2.1 +name: Psalm Security Scan + +on: [push, pull_request] + +jobs: + psalm-security-scan: + name: Psalm + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Psalm Security Scan + uses: docker://ghcr.io/psalm/psalm-security-scan + + - name: Import Security Analysis results into GitHub Security Code Scanning + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif From 429e74f3293887d4d300c33fc4e1e1cce2563534 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 16:46:21 +1000 Subject: [PATCH 13/32] Update composer.json to PHP minimum version 7.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3579b367..8f47d675 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,6 @@ "homepage": "http://z-push.org/", "license": "AGPL-3.0", "require": { - "php": ">=5.4.0" + "php": ">=7.4.0" } } From 822ecae37495e740ea35db5e1e1b6381d1b7e019 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 17:01:25 +1000 Subject: [PATCH 14/32] set psalm docker image --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9b5daf3..98e42f37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v3 - name: Psalm Security Scan - uses: docker://ghcr.io/psalm/psalm-security-scan + uses: docker://ghcr.io/psalm/psalm-security-scan@4.4.1 - name: Import Security Analysis results into GitHub Security Code Scanning uses: github/codeql-action/upload-sarif@v2 From 7dd2ba4a1a28d3f1fbffaf98bfdce58b4b1bb160 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 31 May 2023 17:04:38 +1000 Subject: [PATCH 15/32] update psalm action --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98e42f37..efc27c42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v3 - name: Psalm Security Scan - uses: docker://ghcr.io/psalm/psalm-security-scan@4.4.1 + uses: docker://ghcr.io/psalm/psalm-security-scan:4.4.1 - name: Import Security Analysis results into GitHub Security Code Scanning uses: github/codeql-action/upload-sarif@v2 From 962a58301f9f5034b39e5c4316a1898c968b0815 Mon Sep 17 00:00:00 2001 From: DoobleD Date: Fri, 14 Jul 2023 17:32:09 +0200 Subject: [PATCH 16/32] fix error mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "windows-1256" --- src/lib/utils/utils.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/utils/utils.php b/src/lib/utils/utils.php index e6826f75..d4b5d8e1 100644 --- a/src/lib/utils/utils.php +++ b/src/lib/utils/utils.php @@ -1278,7 +1278,11 @@ private static function convertRawHeader2Utf8($nonencstr, $utf8str) { $str .= $val->text; } else { - $str .= @mb_convert_encoding($val->text, "utf-8", $val->charset); + try { + $str .= @mb_convert_encoding($val->text, "utf-8", $val->charset); + } catch (ValueError $exception) { + $str .= @iconv($val->charset, "utf-8", $val->text); + } } } if (!$isiso2022jp) { From 7b3432fa4559f0be6e187b15a72995b62fcc248d Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 4 Aug 2023 03:44:16 +1000 Subject: [PATCH 17/32] Update CONTRIBUTING.md Spelling --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37ffab07..a12ceb8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ License, version 3 (AGPLv3). There is a need to document that contributors understand the above. All contributors must explicitly and publicly release their code under AGPLv3 at -least once with one of the following statments: +least once with one of the following statements: * Released under the GNU Affero General Public License (AGPL), version 3. * Released under the GNU Affero General Public License (AGPL), version 3 and Trademark Additional Terms. @@ -32,4 +32,4 @@ least once with one of the following statments: ## Code of Conduct This project has a [Code of Conduct](CODE_OF_CONDUCT.md). Please review it when -joining our community. \ No newline at end of file +joining our community. From 2f0b2c82c966021f5d8ad110cb30d962730f419e Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:43:24 +1000 Subject: [PATCH 18/32] PHP8.0 mail() to use /r/n line endings Used less than PHP 8.0, as this is a breaking change for PHP 7.4. --- src/backend/imap/Mail/mail.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/imap/Mail/mail.php b/src/backend/imap/Mail/mail.php index 60cc3d8b..f1bf80a6 100644 --- a/src/backend/imap/Mail/mail.php +++ b/src/backend/imap/Mail/mail.php @@ -91,10 +91,12 @@ public function __construct($params = null) /* Because the mail() function may pass headers as command * line arguments, we can't guarantee the use of the standard * "\r\n" separator. Instead, we use the system's native line - * separator. */ - if (defined('PHP_EOL')) { + * separator. + * Fixed in PHP 8.0. + */ + if (defined('PHP_EOL') && version_compare(PHP_VERSION, '8.0.0', '<')) { $this->sep = PHP_EOL; - } else { + } elseif (version_compare(PHP_VERSION, '8.0.0', '<')) { $this->sep = (strpos(PHP_OS, 'WIN') === false) ? "\n" : "\r\n"; } } From 0d65a74a841a9b1ee2939b19df865e5b7d04dc8d Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:01:28 +1100 Subject: [PATCH 19/32] Create version file for 2.7.1 --- src/version | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/version diff --git a/src/version b/src/version new file mode 100644 index 00000000..860487ca --- /dev/null +++ b/src/version @@ -0,0 +1 @@ +2.7.1 From bdbdd8fd2785cbbcb54a2e07c8e6e95a51030e9a Mon Sep 17 00:00:00 2001 From: DoobleD Date: Thu, 19 Oct 2023 15:30:15 +0200 Subject: [PATCH 20/32] Fix some PHP8 errors for IMAP backend --- src/backend/imap/imap.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backend/imap/imap.php b/src/backend/imap/imap.php index 5d3ecbf6..85177825 100644 --- a/src/backend/imap/imap.php +++ b/src/backend/imap/imap.php @@ -1022,7 +1022,7 @@ public function GetMessageList($folderid, $cutoffdate) { if ($cutoffdate > 0) { // IMAP SINCE search criteria - $searchCriteria = "SINCE ". date("d-M-Y", $cutoffdate); + $searchCriteria = "SINCE ". date("d-M-Y", (int) $cutoffdate); // search messages in time range $search = @imap_search($this->mbox, $searchCriteria); @@ -1128,7 +1128,7 @@ public function GetMessageList($folderid, $cutoffdate) { public function GetMessage($folderid, $id, $contentparameters) { $truncsize = Utils::GetTruncSize($contentparameters->GetTruncation()); $mimesupport = $contentparameters->GetMimeSupport(); - $bodypreference = $contentparameters->GetBodyPreference(); /* fmbiete's contribution r1528, ZP-320 */ + $bodypreference = $contentparameters->GetBodyPreference() ?: []; /* fmbiete's contribution r1528, ZP-320 */ ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendIMAP->GetMessage('%s', '%s', '%s')", $folderid, $id, implode(",", $bodypreference))); $folderImapid = $this->getImapIdFromFolderId($folderid); @@ -1167,7 +1167,7 @@ public function GetMessage($folderid, $id, $contentparameters) { // Detect Apple iOS devices $isAppleIosDevice = false; - $deviceType = strtolower(Request::GetDeviceType()); + $deviceType = strtolower(Request::GetDeviceType() ?? ''); if ($deviceType == 'iphone' || $deviceType == 'ipad' || $deviceType == 'ipod') { ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendIMAP->GetMessage():: iOS device %s->%s detected", Request::GetDeviceType(), Request::GetUserAgent())); $isAppleIosDevice = true; @@ -2505,6 +2505,9 @@ protected function parseAddr($ad) { * @return */ protected function getModAndParentNames($fhir, &$displayname, &$parent) { + if (is_string($fhir)) { + $fhir = [$fhir]; + } // if mod is already set add the previous part to it as it might be a folder which has delimiter in its name $displayname = (isset($displayname) && strlen($displayname) > 0) ? $displayname = array_pop($fhir) . $this->getServerDelimiter() . $displayname : array_pop($fhir); $parent = implode($this->getServerDelimiter(), $fhir); From 9acaa5cde5fa3de7eed408d0ab099de035ab0a60 Mon Sep 17 00:00:00 2001 From: Phil Date: Sun, 26 Nov 2023 10:08:41 +0100 Subject: [PATCH 21/32] corrected (dead-)links --- src/lib/core/zpush.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/core/zpush.php b/src/lib/core/zpush.php index e2d5283e..be522278 100644 --- a/src/lib/core/zpush.php +++ b/src/lib/core/zpush.php @@ -825,10 +825,10 @@ static public function PrintZPushLegal($message = "", $additionalMessage = "") { $message $additionalMessage

More information about Z-Push can be found at:
- Z-Push homepage
- Z-Push download page
- Z-Push Bugtracker
- Z-Push Wiki and Roadmap
+ Z-Push homepage
+ Z-Push download page
+ Z-Push Bugtracker
+ Z-Push Wiki and Roadmap

All modifications to this sourcecode must be published and returned to the community.
Please see AGPLv3 License for details.
From 56dbf5588b80e913a6757f92778dde711160b816 Mon Sep 17 00:00:00 2001 From: Phil Date: Sun, 26 Nov 2023 11:09:22 +0100 Subject: [PATCH 22/32] Update zpush.php --- src/lib/core/zpush.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/zpush.php b/src/lib/core/zpush.php index be522278..058d9c0a 100644 --- a/src/lib/core/zpush.php +++ b/src/lib/core/zpush.php @@ -825,7 +825,7 @@ static public function PrintZPushLegal($message = "", $additionalMessage = "") { $message $additionalMessage

More information about Z-Push can be found at:
- Z-Push homepage
+ Z-Push homepage
Z-Push download page
Z-Push Bugtracker
Z-Push Wiki and Roadmap
From faee69f32f17462c762e00d4dc0410fd040aaba7 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:42:19 +1100 Subject: [PATCH 23/32] Create custom.md Add blank issue template --- .github/ISSUE_TEMPLATE/custom.md | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/custom.md diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 00000000..b28ec84f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,38 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + +**Describe the issue** +A clear and concise description of what the issue is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From d60e683e00cec188ef5cd71809037f8c1cd5b2a3 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:46:14 +1100 Subject: [PATCH 24/32] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 516d47bc..86a2b54d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,12 @@ +--- +name: Bug Report +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + **Describe the bug** A clear and concise description of what the bug is. From a64b267912df19a0b5aa08c8f130e5d53f39789d Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:49:17 +1100 Subject: [PATCH 25/32] Update custom.md --- .github/ISSUE_TEMPLATE/custom.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index b28ec84f..fbfe9080 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -1,6 +1,6 @@ --- -name: Custom issue template -about: Describe this issue template's purpose here. +name: Issue +about: General Issue title: '' labels: '' assignees: '' From 2c110759cc669c6d2db13239d62de1a97c26a327 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:00:07 +1100 Subject: [PATCH 26/32] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 86a2b54d..ccdabbfc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug Report -about: Describe this issue template's purpose here. +about: Use this when you have found a replicateable bug. title: '' labels: '' assignees: '' From 11f53c62ef88e0b7fb9a765ac803ae9eeaa58f9a Mon Sep 17 00:00:00 2001 From: liverpoolfcfan <2759714+liverpoolfc-fan@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:32:12 +0000 Subject: [PATCH 27/32] Update pingtracking.php --- src/lib/core/pingtracking.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/core/pingtracking.php b/src/lib/core/pingtracking.php index a82ea9a3..6c91ad5f 100644 --- a/src/lib/core/pingtracking.php +++ b/src/lib/core/pingtracking.php @@ -107,8 +107,21 @@ public function DoForcePingTimeout() { // check if there is another (and newer) active ping connection if (is_array($pings) && isset($pings[self::$devid][self::$user]) && count($pings[self::$devid][self::$user]) > 1) { foreach ($pings[self::$devid][self::$user] as $pid=>$starttime) - if ($starttime > self::$start) + if ($starttime > self::$start) { +ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . "Other process starttime after mine so terminate me - return TRUE"); return true; + } + elseif ($starttime == self::$start) { + if ($pid > self::$pid) { +ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'Other process [' . $pid .'] starttime same as mine : Other process ID is "bigger" than mine - return TRUE'); + return true; + } elseif ($pid < self::$pid) { +ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'Other process [' . $pid .'] starttime same as mine : Other process ID is "smaller" than mine - return FALSE'); + } + else { +ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'This is my PID - Ignore me - return FALSE'); + } + } } return false; From 079d24885e6c70af23bca81c4647a036c4e6bd96 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 22 Feb 2024 15:43:28 +0100 Subject: [PATCH 28/32] Update zpush.php download-Page link corrected --- src/lib/core/zpush.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/zpush.php b/src/lib/core/zpush.php index 058d9c0a..5b42e604 100644 --- a/src/lib/core/zpush.php +++ b/src/lib/core/zpush.php @@ -826,7 +826,7 @@ static public function PrintZPushLegal($message = "", $additionalMessage = "") {

More information about Z-Push can be found at:
Z-Push homepage
- Z-Push download page
+ Z-Push download page
Z-Push Bugtracker
Z-Push Wiki and Roadmap

From 43f34d04436381081d4e5abdbac3ad661c0b6171 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:46:30 +1000 Subject: [PATCH 29/32] Update version to 2.7.2 --- src/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version b/src/version index 860487ca..37c2961c 100644 --- a/src/version +++ b/src/version @@ -1 +1 @@ -2.7.1 +2.7.2 From dc9d730c28c9d3659bf71abb2a6308c0be466453 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:56:05 +1000 Subject: [PATCH 30/32] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 37811cf3..af1c67f8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,4 @@ +Released under the GNU Affero General Public License (AGPL), version 3 From c9455507d65f6365f4c6a97497cb5fa65a5dd046 Mon Sep 17 00:00:00 2001 From: liverpoolfcfan <2759714+liverpoolfc-fan@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:15:39 +0100 Subject: [PATCH 31/32] Update pingtracking.php Removed DEBUG statements and associated branches. Added comment --- src/lib/core/pingtracking.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib/core/pingtracking.php b/src/lib/core/pingtracking.php index 6c91ad5f..4b9adc6c 100644 --- a/src/lib/core/pingtracking.php +++ b/src/lib/core/pingtracking.php @@ -108,18 +108,13 @@ public function DoForcePingTimeout() { if (is_array($pings) && isset($pings[self::$devid][self::$user]) && count($pings[self::$devid][self::$user]) > 1) { foreach ($pings[self::$devid][self::$user] as $pid=>$starttime) if ($starttime > self::$start) { -ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . "Other process starttime after mine so terminate me - return TRUE"); return true; } elseif ($starttime == self::$start) { + // Arbitrary decision to differentiate multiple processes that started at the same second for the same user. Compare PIDs + // If the other process has a bigger PID then kill this process if ($pid > self::$pid) { -ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'Other process [' . $pid .'] starttime same as mine : Other process ID is "bigger" than mine - return TRUE'); return true; - } elseif ($pid < self::$pid) { -ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'Other process [' . $pid .'] starttime same as mine : Other process ID is "smaller" than mine - return FALSE'); - } - else { -ZLog::Write(LOGLEVEL_DEBUG, "MultiPINGS: " . 'This is my PID - Ignore me - return FALSE'); } } } From 409341d1d054d4a29ffda77b3b038135dad6c458 Mon Sep 17 00:00:00 2001 From: matidau <65836048+matidau@users.noreply.github.com> Date: Fri, 10 May 2024 20:45:56 +1000 Subject: [PATCH 32/32] Update version to 2.7.3 --- src/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version b/src/version index 37c2961c..2c9b4ef4 100644 --- a/src/version +++ b/src/version @@ -1 +1 @@ -2.7.2 +2.7.3