├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── actions │ ├── build │ │ ├── image │ │ │ └── action.yaml │ │ └── package │ │ │ └── action.yaml │ ├── test │ │ └── action.yaml │ └── version │ │ └── action.yaml └── workflows │ ├── close-inactive-issues.yaml │ ├── codeql.yml │ ├── master.yaml │ ├── release.yaml │ └── test.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── CODEOWNERS ├── CREDITS ├── LICENSE ├── Makefile.in ├── README.md ├── RELEASE_NOTES ├── SECURITY.md ├── VERSION ├── aclocal.m4 ├── build ├── Dockerfile.bionic ├── Dockerfile.focal ├── Dockerfile.jammy ├── Dockerfile.noble ├── Dockerfile.oracle8 ├── Dockerfile.oracle9 ├── README.md ├── fpm-piler-after-install.sh ├── fpm-piler-before-install.sh ├── piler.conf └── run.sh ├── config.php.in ├── configure ├── configure.in ├── contrib ├── README ├── export-attachments │ └── export-attachments.php ├── imap │ ├── Makefile.in │ └── imap-seen.c ├── installer │ ├── compile-on-ubuntu.sh │ ├── focal.sh │ └── jammy.sh ├── milter │ └── pilter.pl ├── mime │ └── mime.types ├── o365 │ ├── README.md │ ├── config.py │ ├── download-emails.py │ └── requirements.txt ├── pop3 │ └── batch-import-without-removing.sh ├── proxmox-lxc │ ├── README │ ├── create_lxc.sh │ ├── mailpiler.orig │ ├── matrix.orig │ └── zmb_mem.orig ├── selinux │ ├── README │ └── piler.te ├── smtp │ ├── dictionary.txt │ └── smtp-source.py └── webserver │ ├── piler-apache-2.x.conf │ └── piler-nginx.conf ├── cppcheck.sh ├── docker ├── Dockerfile ├── README.md ├── build.sh ├── docker-compose.yaml ├── manticore.conf ├── piler.cnf └── start.sh ├── etc ├── Makefile.in ├── config-site.dist.php ├── cron.jobs.in ├── example.conf ├── manticore.conf.in ├── smtp.acl.example └── sphinx.conf.in ├── init.d ├── Makefile.in ├── rc.piler.in └── rc.searchd.in ├── install-sh ├── mkinstalldirs ├── piler-config.h.in ├── src ├── Makefile.in ├── archive.c ├── attachment.c ├── bdat.c ├── cfg.c ├── cfg.h ├── config.h ├── counters.c ├── decoder.c ├── decoder.h ├── defs.h ├── digest.c ├── dirs.c ├── errmsg.h ├── extract.c ├── hash.c ├── hash.h ├── htmlentities.h ├── imap.c ├── import.c ├── import.h ├── import_imap.c ├── import_mailbox.c ├── import_maildir.c ├── import_pilerexport.c ├── import_pop3.c ├── memc.c ├── memc.h ├── message.c ├── misc.c ├── misc.h ├── mydomains.c ├── mysql.c ├── parser.c ├── parser.h ├── parser_utils.c ├── piler-smtp.c ├── piler.c ├── piler.h ├── pileraget.c ├── pilerconf.c ├── pilerexport.c ├── pilerget.c ├── pilerimport.c ├── pop3.c ├── reindex.c ├── rules.c ├── rules.h ├── screen.c ├── screen.h ├── session.c ├── sig.c ├── sig.h ├── smtp.c ├── smtp.h ├── smtpcodes.h ├── sql.h ├── stats.c ├── store.c ├── tai.c ├── tai.h ├── test.c ├── tokenizer.c └── trans.h ├── suppressions.txt ├── systemd ├── Makefile.in ├── piler-smtp.service ├── piler.service └── pilersearch.service ├── test_files ├── 1.eml ├── 2.eml ├── 3.eml ├── 4.eml ├── 5.eml ├── 6.eml ├── 7.eml └── 8.eml ├── tests ├── addons.sh ├── config-site-extras.php ├── run.sh ├── setup.sh └── setup.sql ├── unit_tests ├── 1.eml ├── 13-xlsx.eml ├── 15-image-only-spam.eml ├── 16-rfc822-attachment-1.eml ├── 17-attached-text-bogus-mime.eml ├── 18-spam-html-encoding.eml ├── 19-pdf-attachment-bad-mime.eml ├── 2.eml ├── 20-pdf-attachment-bad-mime.eml ├── 21-register-tricky-urls.eml ├── 3.eml ├── 30-subject.eml ├── 31-subject.eml ├── 32-subject.eml ├── 33-subject.eml ├── 35-encrypted-zip.eml ├── 4.eml ├── 5-ibm-images.eml ├── 5.eml ├── 6.eml ├── 7.eml ├── 8.eml ├── 9-attached-text.eml ├── Makefile.in ├── check_attachments.c ├── check_decoder.c ├── check_digest.c ├── check_hash.c ├── check_misc.c ├── check_mydomains.c ├── check_parser.c ├── check_parser_utils.c ├── check_rules.c ├── common.c ├── run.sh ├── smtp.c ├── test.conf ├── test.h └── words.h ├── util ├── Makefile.in ├── automated-search.php ├── config-site.php.in ├── daily-report.php ├── db-mysql-root.sql.in ├── db-mysql.sql ├── db-upgrade-0.1.18-vs-0.1.19.sql ├── db-upgrade-0.1.19-vs-0.1.20.sql ├── db-upgrade-0.1.20-vs-0.1.21.sql ├── db-upgrade-0.1.21-vs-0.1.22.sql ├── db-upgrade-0.1.22-vs-0.1.23.sql ├── db-upgrade-0.1.23-vs-0.1.24.sql ├── db-upgrade-0.1.24-vs-1.1.0.sql ├── db-upgrade-1.1.0-vs-1.2.0.sql ├── db-upgrade.sql ├── deduphelper ├── download-imap.php ├── generate_stats.php ├── get-token.py ├── gmail-imap-import.php ├── healthcheck.sh ├── imapfetch.py ├── import.sh.in ├── indexer.attachment.sh.in ├── indexer.delta.sh.in ├── indexer.main.sh.in ├── mailstat.php ├── pilerpurge.py ├── postinstall.sh.in ├── purge.sh ├── refresh-token.py ├── reindex.sh └── sign.php └── webui ├── .htaccess ├── Makefile.in ├── Zend ├── Exception.php ├── Mail.php ├── Mail │ ├── Exception.php │ ├── Header │ │ ├── HeaderName.php │ │ └── HeaderValue.php │ ├── Message.php │ ├── Message │ │ ├── File.php │ │ └── Interface.php │ ├── Part.php │ ├── Part │ │ ├── File.php │ │ └── Interface.php │ ├── Protocol │ │ ├── Abstract.php │ │ ├── Exception.php │ │ ├── Imap.php │ │ ├── Pop3.php │ │ ├── Smtp.php │ │ └── Smtp │ │ │ └── Auth │ │ │ ├── Crammd5.php │ │ │ ├── Login.php │ │ │ └── Plain.php │ ├── Storage.php │ ├── Storage │ │ ├── Abstract.php │ │ ├── Exception.php │ │ ├── Folder.php │ │ ├── Folder │ │ │ ├── Interface.php │ │ │ ├── Maildir.php │ │ │ └── Mbox.php │ │ ├── Imap.php │ │ ├── Maildir.php │ │ ├── Mbox.php │ │ ├── Pop3.php │ │ └── Writable │ │ │ ├── Interface.php │ │ │ └── Maildir.php │ └── Transport │ │ ├── Abstract.php │ │ ├── Exception.php │ │ ├── File.php │ │ ├── Sendmail.php │ │ └── Smtp.php ├── Mime.php └── Mime │ ├── Decode.php │ ├── Exception.php │ ├── Message.php │ └── Part.php ├── assets ├── css │ └── piler.css ├── font │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── ico │ ├── apple-touch-icon-114-precomposed.png │ ├── apple-touch-icon-144-precomposed.png │ ├── apple-touch-icon-57-precomposed.png │ ├── apple-touch-icon-72-precomposed.png │ └── favicon.png ├── images │ ├── 1x1.gif │ ├── archive-logo-lg.png │ ├── archive-logo-sm.png │ ├── branding-logo.png │ ├── fileicons │ │ ├── audio.png │ │ ├── doc.png │ │ ├── file.png │ │ ├── image.png │ │ ├── odf.png │ │ ├── pdf.png │ │ ├── ppt.png │ │ ├── rar.png │ │ ├── swf.png │ │ ├── txt.png │ │ ├── vcf.png │ │ ├── video.png │ │ └── xls.png │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ └── remote.gif └── js │ ├── fileupload.js │ ├── piler.js │ └── resizer.js ├── controller ├── accounting │ └── accounting.php ├── audit │ ├── audit.php │ ├── download.php │ ├── helper.php │ └── removal.php ├── common │ ├── error.php │ ├── footer.php │ ├── layout-audit-removal.php │ ├── layout-audit.php │ ├── layout-email.php │ ├── layout-empty.php │ ├── layout-search.php │ ├── layout.php │ ├── menu.php │ └── not_found.php ├── customer │ ├── list.php │ ├── remove.php │ └── removelogo.php ├── domain │ ├── domain.php │ ├── domains.php │ └── remove.php ├── folder │ ├── copy.php │ ├── edit.php │ ├── folder.php │ └── list.php ├── group │ ├── add.php │ ├── edit.php │ ├── group.php │ ├── list.php │ └── remove.php ├── health │ ├── health.php │ └── worker.php ├── import │ ├── jobs.php │ ├── list.php │ ├── remove.php │ └── test.php ├── ldap │ ├── domains.php │ ├── list.php │ ├── remove.php │ └── test.php ├── login │ ├── foureyes.php │ ├── ga.php │ ├── google.php │ ├── login.php │ ├── logout.php │ └── sso.php ├── message │ ├── attachment.php │ ├── attachments.php │ ├── bulkpdf.php │ ├── bulkremove.php │ ├── bulkrestore.php │ ├── dl.php │ ├── download.php │ ├── folder.php │ ├── headers.php │ ├── journal.php │ ├── note.php │ ├── notspam.php │ ├── pdf.php │ ├── private.php │ ├── rejectremove.php │ ├── remove.php │ ├── restore.php │ └── view.php ├── policy │ ├── apply.php │ ├── exclusion.php │ ├── folder.php │ ├── legalhold.php │ ├── removeexclusion.php │ ├── removefolder.php │ ├── removehold.php │ ├── removeretention.php │ ├── retention.php │ └── updateretention.php ├── search │ ├── autosearch.php │ ├── folder.php │ ├── helper.php │ ├── load.php │ ├── remove.php │ ├── save.php │ ├── search.php │ └── tag.php ├── stat │ ├── online.php │ └── stat.php └── user │ ├── add.php │ ├── edit.php │ ├── list.php │ ├── remove.php │ └── settings.php ├── google-api ├── apiClient.php ├── auth │ ├── apiAuth.php │ ├── apiAuthNone.php │ ├── apiLoginTicket.php │ ├── apiOAuth.php │ ├── apiOAuth2.php │ ├── apiP12Signer.php │ ├── apiPemVerifier.php │ ├── apiSigner.php │ └── apiVerifier.php ├── cache │ ├── apiApcCache.php │ ├── apiCache.php │ ├── apiFileCache.php │ └── apiMemcacheCache.php ├── config.php ├── contrib │ ├── apiAdsenseService.php │ ├── apiAnalyticsService.php │ ├── apiBigqueryService.php │ ├── apiBloggerService.php │ ├── apiBooksService.php │ ├── apiCalendarService.php │ ├── apiCustomsearchService.php │ ├── apiFreebaseService.php │ ├── apiGanService.php │ ├── apiLatitudeService.php │ ├── apiModeratorService.php │ ├── apiOauth2Service.php │ ├── apiOrkutService.php │ ├── apiPagespeedonlineService.php │ ├── apiPlusService.php │ ├── apiPredictionService.php │ ├── apiShoppingService.php │ ├── apiSiteVerificationService.php │ ├── apiTasksService.php │ ├── apiTranslateService.php │ ├── apiUrlshortenerService.php │ └── apiWebfontsService.php ├── external │ ├── OAuth.php │ └── URITemplateParser.php ├── io │ ├── apiCacheParser.php │ ├── apiCurlIO.php │ ├── apiHttpRequest.php │ ├── apiIO.php │ ├── apiREST.php │ ├── apiRPC.php │ └── cacerts.pem └── service │ ├── apiBatch.php │ ├── apiMediaFileUpload.php │ ├── apiModel.php │ ├── apiService.php │ ├── apiServiceRequest.php │ ├── apiServiceResource.php │ └── apiUtils.php ├── images └── .nofile ├── index.php ├── js.php ├── language ├── cn │ └── messages.php ├── cz │ └── messages.php ├── de │ └── messages.php ├── en │ └── messages.php ├── es │ └── messages.php ├── fr │ └── messages.php ├── hu │ └── messages.php ├── it │ └── messages.php ├── ja │ └── messages.php ├── pl │ └── messages.php ├── pt │ └── messages.php ├── ru │ └── messages.php ├── tr │ └── messages.php ├── tw │ └── messages.php └── uk │ └── messages.php ├── log ├── .htaccess └── lock ├── model ├── accounting │ └── accounting.php ├── audit │ ├── audit.php │ └── removal.php ├── domain │ └── domain.php ├── folder │ └── folder.php ├── google │ └── google.php ├── group │ └── group.php ├── health │ └── health.php ├── mail │ └── mail.php ├── message │ ├── attachment.php │ ├── pdf.php │ ├── restore.php │ └── zip.php ├── policy │ ├── exclusion.php │ ├── folder.php │ ├── hold.php │ └── retention.php ├── saas │ ├── customer.php │ ├── import.php │ └── ldap.php ├── search │ ├── auto.php │ ├── message.php │ └── search.php ├── stat │ ├── chart.php │ └── counter.php └── user │ ├── auth.php │ ├── google.php │ ├── import.php │ ├── prefs.php │ └── user.php ├── ok.txt ├── phpunit.xml ├── qr.php ├── securimage ├── AHGBold.ttf ├── LICENSE.txt ├── README.FONT.txt ├── README.txt ├── WavFile.php ├── backgrounds │ ├── bg3.jpg │ ├── bg4.jpg │ ├── bg5.jpg │ └── bg6.png ├── database │ ├── .htaccess │ ├── index.html │ └── securimage.sq3 ├── images │ ├── audio_icon.png │ └── refresh.png ├── securimage.php ├── securimage_play.php ├── securimage_play.swf ├── securimage_show.php └── words │ └── words.txt ├── sso.php ├── system ├── controller.php ├── database │ ├── ldap.php │ ├── mysql.php │ ├── sphinx.php │ └── sqlite.php ├── db.php ├── document.php ├── front.php ├── helper │ ├── HTMLPurifier.standalone.php │ ├── PHPGangsta_GoogleAuthenticator.php │ ├── TrustedTimestamps.php │ ├── mime.php │ ├── phpqrcode │ │ ├── CHANGELOG │ │ ├── INSTALL │ │ ├── LICENSE │ │ ├── README │ │ ├── VERSION │ │ ├── bindings │ │ │ └── tcpdf │ │ │ │ └── qrcode.php │ │ ├── index.php │ │ ├── phpqrcode.php │ │ ├── qrbitstream.php │ │ ├── qrconfig.php │ │ ├── qrconst.php │ │ ├── qrencode.php │ │ ├── qrimage.php │ │ ├── qrinput.php │ │ ├── qrlib.php │ │ ├── qrmask.php │ │ ├── qrrscode.php │ │ ├── qrspec.php │ │ ├── qrsplit.php │ │ ├── qrtools.php │ │ └── tools │ │ │ ├── merge.bat │ │ │ ├── merge.php │ │ │ ├── merge.sh │ │ │ ├── merged_config.php │ │ │ └── merged_header.php │ └── standalone │ │ └── HTMLPurifier │ │ ├── ConfigSchema │ │ ├── Builder │ │ │ ├── ConfigSchema.php │ │ │ └── Xml.php │ │ ├── Exception.php │ │ ├── Interchange.php │ │ ├── Interchange │ │ │ ├── Directive.php │ │ │ └── Id.php │ │ ├── InterchangeBuilder.php │ │ ├── Validator.php │ │ ├── ValidatorAtom.php │ │ ├── schema.ser │ │ └── schema │ │ │ ├── Attr.AllowedClasses.txt │ │ │ ├── Attr.AllowedFrameTargets.txt │ │ │ ├── Attr.AllowedRel.txt │ │ │ ├── Attr.AllowedRev.txt │ │ │ ├── Attr.ClassUseCDATA.txt │ │ │ ├── Attr.DefaultImageAlt.txt │ │ │ ├── Attr.DefaultInvalidImage.txt │ │ │ ├── Attr.DefaultInvalidImageAlt.txt │ │ │ ├── Attr.DefaultTextDir.txt │ │ │ ├── Attr.EnableID.txt │ │ │ ├── Attr.ForbiddenClasses.txt │ │ │ ├── Attr.ID.HTML5.txt │ │ │ ├── Attr.IDBlacklist.txt │ │ │ ├── Attr.IDBlacklistRegexp.txt │ │ │ ├── Attr.IDPrefix.txt │ │ │ ├── Attr.IDPrefixLocal.txt │ │ │ ├── AutoFormat.AutoParagraph.txt │ │ │ ├── AutoFormat.Custom.txt │ │ │ ├── AutoFormat.DisplayLinkURI.txt │ │ │ ├── AutoFormat.Linkify.txt │ │ │ ├── AutoFormat.PurifierLinkify.DocURL.txt │ │ │ ├── AutoFormat.PurifierLinkify.txt │ │ │ ├── AutoFormat.RemoveEmpty.Predicate.txt │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt │ │ │ ├── AutoFormat.RemoveEmpty.RemoveNbsp.txt │ │ │ ├── AutoFormat.RemoveEmpty.txt │ │ │ ├── AutoFormat.RemoveSpansWithoutAttributes.txt │ │ │ ├── CSS.AllowDuplicates.txt │ │ │ ├── CSS.AllowImportant.txt │ │ │ ├── CSS.AllowTricky.txt │ │ │ ├── CSS.AllowedFonts.txt │ │ │ ├── CSS.AllowedProperties.txt │ │ │ ├── CSS.DefinitionRev.txt │ │ │ ├── CSS.ForbiddenProperties.txt │ │ │ ├── CSS.MaxImgLength.txt │ │ │ ├── CSS.Proprietary.txt │ │ │ ├── CSS.Trusted.txt │ │ │ ├── Cache.DefinitionImpl.txt │ │ │ ├── Cache.SerializerPath.txt │ │ │ ├── Cache.SerializerPermissions.txt │ │ │ ├── Core.AggressivelyFixLt.txt │ │ │ ├── Core.AllowHostnameUnderscore.txt │ │ │ ├── Core.CollectErrors.txt │ │ │ ├── Core.ColorKeywords.txt │ │ │ ├── Core.ConvertDocumentToFragment.txt │ │ │ ├── Core.DirectLexLineNumberSyncInterval.txt │ │ │ ├── Core.DisableExcludes.txt │ │ │ ├── Core.EnableIDNA.txt │ │ │ ├── Core.Encoding.txt │ │ │ ├── Core.EscapeInvalidChildren.txt │ │ │ ├── Core.EscapeInvalidTags.txt │ │ │ ├── Core.EscapeNonASCIICharacters.txt │ │ │ ├── Core.HiddenElements.txt │ │ │ ├── Core.Language.txt │ │ │ ├── Core.LexerImpl.txt │ │ │ ├── Core.MaintainLineNumbers.txt │ │ │ ├── Core.NormalizeNewlines.txt │ │ │ ├── Core.RemoveInvalidImg.txt │ │ │ ├── Core.RemoveProcessingInstructions.txt │ │ │ ├── Core.RemoveScriptContents.txt │ │ │ ├── Filter.Custom.txt │ │ │ ├── Filter.ExtractStyleBlocks.Escaping.txt │ │ │ ├── Filter.ExtractStyleBlocks.Scope.txt │ │ │ ├── Filter.ExtractStyleBlocks.TidyImpl.txt │ │ │ ├── Filter.ExtractStyleBlocks.txt │ │ │ ├── Filter.YouTube.txt │ │ │ ├── HTML.Allowed.txt │ │ │ ├── HTML.AllowedAttributes.txt │ │ │ ├── HTML.AllowedComments.txt │ │ │ ├── HTML.AllowedCommentsRegexp.txt │ │ │ ├── HTML.AllowedElements.txt │ │ │ ├── HTML.AllowedModules.txt │ │ │ ├── HTML.Attr.Name.UseCDATA.txt │ │ │ ├── HTML.BlockWrapper.txt │ │ │ ├── HTML.CoreModules.txt │ │ │ ├── HTML.CustomDoctype.txt │ │ │ ├── HTML.DefinitionID.txt │ │ │ ├── HTML.DefinitionRev.txt │ │ │ ├── HTML.Doctype.txt │ │ │ ├── HTML.FlashAllowFullScreen.txt │ │ │ ├── HTML.ForbiddenAttributes.txt │ │ │ ├── HTML.ForbiddenElements.txt │ │ │ ├── HTML.MaxImgLength.txt │ │ │ ├── HTML.Nofollow.txt │ │ │ ├── HTML.Parent.txt │ │ │ ├── HTML.Proprietary.txt │ │ │ ├── HTML.SafeEmbed.txt │ │ │ ├── HTML.SafeIframe.txt │ │ │ ├── HTML.SafeObject.txt │ │ │ ├── HTML.SafeScripting.txt │ │ │ ├── HTML.Strict.txt │ │ │ ├── HTML.TargetBlank.txt │ │ │ ├── HTML.TargetNoreferrer.txt │ │ │ ├── HTML.TidyAdd.txt │ │ │ ├── HTML.TidyLevel.txt │ │ │ ├── HTML.TidyRemove.txt │ │ │ ├── HTML.Trusted.txt │ │ │ ├── HTML.XHTML.txt │ │ │ ├── Output.CommentScriptContents.txt │ │ │ ├── Output.FixInnerHTML.txt │ │ │ ├── Output.FlashCompat.txt │ │ │ ├── Output.Newline.txt │ │ │ ├── Output.SortAttr.txt │ │ │ ├── Output.TidyFormat.txt │ │ │ ├── Test.ForceNoIconv.txt │ │ │ ├── URI.AllowedSchemes.txt │ │ │ ├── URI.Base.txt │ │ │ ├── URI.DefaultScheme.txt │ │ │ ├── URI.DefinitionID.txt │ │ │ ├── URI.DefinitionRev.txt │ │ │ ├── URI.Disable.txt │ │ │ ├── URI.DisableExternal.txt │ │ │ ├── URI.DisableExternalResources.txt │ │ │ ├── URI.DisableResources.txt │ │ │ ├── URI.Host.txt │ │ │ ├── URI.HostBlacklist.txt │ │ │ ├── URI.MakeAbsolute.txt │ │ │ ├── URI.Munge.txt │ │ │ ├── URI.MungeResources.txt │ │ │ ├── URI.MungeSecretKey.txt │ │ │ ├── URI.OverrideAllowedSchemes.txt │ │ │ ├── URI.SafeIframeRegexp.txt │ │ │ └── info.ini │ │ ├── EntityLookup │ │ └── entities.ser │ │ ├── Filter │ │ ├── ExtractStyleBlocks.php │ │ └── YouTube.php │ │ ├── Language │ │ ├── classes │ │ │ └── en-x-test.php │ │ └── messages │ │ │ ├── en-x-test.php │ │ │ ├── en-x-testmini.php │ │ │ └── en.php │ │ ├── Lexer │ │ └── PH5P.php │ │ ├── Printer.php │ │ └── Printer │ │ ├── CSSDefinition.php │ │ ├── ConfigForm.css │ │ ├── ConfigForm.js │ │ ├── ConfigForm.php │ │ └── HTMLDefinition.php ├── language.php ├── ldap.php ├── loader.php ├── mail.php ├── misc.php ├── model.php ├── registry.php ├── request.php ├── router.php └── startup.php ├── templates ├── accounting │ ├── accounting.tpl │ └── accounts.tpl ├── audit │ ├── audit.tpl │ ├── helper.tpl │ ├── removal.tpl │ └── remove.tpl ├── common │ ├── common.tpl │ ├── error.tpl │ ├── footer.tpl │ ├── layout-audit-removal.tpl │ ├── layout-audit.tpl │ ├── layout-email.tpl │ ├── layout-empty.tpl │ ├── layout-search.tpl │ ├── layout.tpl │ ├── menu.tpl │ ├── not_found.tpl │ └── paging.tpl ├── customer │ ├── list.tpl │ └── remove.tpl ├── domain │ ├── domains.tpl │ ├── list.tpl │ └── remove.tpl ├── folder │ ├── edit.tpl │ └── list.tpl ├── group │ ├── add.tpl │ ├── edit.tpl │ └── list.tpl ├── health │ ├── daily-report.tpl │ ├── health.tpl │ └── worker.tpl ├── import │ ├── jobs.tpl │ ├── list.tpl │ └── remove.tpl ├── ldap │ ├── domains.tpl │ ├── list.tpl │ └── remove.tpl ├── login │ ├── foureyes.tpl │ ├── ga.tpl │ ├── login.tpl │ └── logout.tpl ├── message │ ├── auto.tpl │ ├── bulkremove.tpl │ ├── bulkrestore.tpl │ ├── headers.tpl │ ├── journal.tpl │ ├── restore.tpl │ └── view.tpl ├── policy │ ├── apply.tpl │ ├── exclusion.tpl │ ├── folder.tpl │ ├── legalhold.tpl │ ├── retention.tpl │ └── updateretention.tpl ├── search │ ├── auto.tpl │ ├── autosearch.tpl │ ├── folder.tpl │ ├── helper.tpl │ ├── load.tpl │ ├── modals.tpl │ ├── search.tpl │ └── tag.tpl ├── stat │ ├── online.tpl │ └── stat.tpl └── user │ ├── add.tpl │ ├── edit.tpl │ ├── list.tpl │ ├── remove.tpl │ └── settings.tpl ├── tests ├── EmailTest.php ├── FormatTest.php ├── MiscTest.php ├── ParseMessageTest.php └── SplitMessageTest.php └── tmp └── index.html /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: jsuto 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] " 5 | labels: '' 6 | assignees: jsuto 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Piler version:** 27 | - "piler -V" output 28 | 29 | **Additional context** 30 | Add any other context about the problem here. 31 | 32 | **Notes** 33 | If sensitive data is required to understand the situation, then don't copy it to the issue, rather send it to my address (see piler -V output) 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Create a feature request to improve the product 4 | title: "[FEATURE] " 5 | labels: '' 6 | assignees: jsuto 7 | 8 | --- 9 | 10 | **Describe the feature** 11 | A clear and concise description of what the feature is, how it should work 12 | 13 | **Additional context** 14 | Add any other context about the problem here. 15 | 16 | **Notes** 17 | If sensitive data is required to understand the situation, then don't copy it to the issue, rather send it to my address (see piler -V output) 18 | -------------------------------------------------------------------------------- /.github/actions/build/image/action.yaml: -------------------------------------------------------------------------------- 1 | name: 'Build image' 2 | 3 | inputs: 4 | DOCKER_USERNAME: 5 | required: true 6 | DOCKER_TOKEN: 7 | required: true 8 | IMAGE_NAME: 9 | required: true 10 | LOAD: 11 | required: false 12 | default: true 13 | PACKAGE: 14 | required: true 15 | PLATFORMS: 16 | required: true 17 | PUSH: 18 | required: false 19 | default: false 20 | 21 | runs: 22 | using: 'composite' 23 | 24 | steps: 25 | - name: Set up Docker Buildx 26 | uses: docker/setup-buildx-action@v3 27 | 28 | - name: Login to Docker Hub 29 | if: github.workflow == 'Create release' 30 | uses: docker/login-action@v3 31 | with: 32 | username: ${{ inputs.DOCKER_USERNAME }} 33 | password: ${{ inputs.DOCKER_TOKEN }} 34 | 35 | - name: Build image from package 36 | uses: docker/build-push-action@v5 37 | with: 38 | context: docker 39 | push: ${{ inputs.PUSH }} 40 | load: ${{ inputs.LOAD }} 41 | tags: ${{ inputs.IMAGE_NAME }} 42 | platforms: ${{ inputs.PLATFORMS }} 43 | build-args: | 44 | PACKAGE=${{ inputs.PACKAGE }} 45 | -------------------------------------------------------------------------------- /.github/actions/version/action.yaml: -------------------------------------------------------------------------------- 1 | name: 'Get version' 2 | 3 | outputs: 4 | COMMIT_ID: 5 | description: 'The short commit hash, eg. deadbeef' 6 | value: ${{ steps.generate-version.outputs.COMMIT_ID }} 7 | 8 | IMAGE_TAG: 9 | description: 'The image tag, eg. 1.2.3-deadbeef' 10 | value: ${{ steps.generate-version.outputs.IMAGE_TAG }} 11 | 12 | VERSION: 13 | description: 'The version number' 14 | value: ${{ steps.generate-version.outputs.VERSION }} 15 | 16 | runs: 17 | using: 'composite' 18 | 19 | steps: 20 | - name: 'Get version tag' 21 | id: generate-version 22 | run: | 23 | git log -1 24 | read -r VERSION < VERSION 25 | COMMIT_ID="$( git rev-parse --short HEAD )" 26 | IMAGE_TAG="${VERSION}-${COMMIT_ID}" 27 | 28 | echo "COMMIT_ID=$COMMIT_ID" >> $GITHUB_OUTPUT 29 | echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT 30 | echo "VERSION=$VERSION" >> $GITHUB_OUTPUT 31 | 32 | echo "image tag: $IMAGE_TAG" 33 | shell: bash 34 | -------------------------------------------------------------------------------- /.github/workflows/close-inactive-issues.yaml: -------------------------------------------------------------------------------- 1 | name: Close inactive issues 2 | on: 3 | schedule: 4 | - cron: "30 1 * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@v5 14 | with: 15 | days-before-issue-stale: 14 16 | days-before-issue-close: 7 17 | stale-issue-label: "stale" 18 | stale-issue-message: "This issue is stale because it has been open for 14 days with no activity." 19 | close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." 20 | days-before-pr-stale: -1 21 | days-before-pr-close: -1 22 | repo-token: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/workflows/master.yaml: -------------------------------------------------------------------------------- 1 | name: Check master merge 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | 10 | get-version: 11 | if: github.ref_name == 'master' 12 | 13 | runs-on: 14 | - self-hosted 15 | - X64 16 | 17 | outputs: 18 | IMAGE_TAG: ${{ steps.get-version.outputs.IMAGE_TAG }} 19 | COMMIT_ID: ${{ steps.get-version.outputs.COMMIT_ID }} 20 | VERSION: ${{ steps.get-version.outputs.VERSION }} 21 | 22 | steps: 23 | - uses: actions/checkout@v4 24 | with: 25 | sparse-checkout: | 26 | VERSION 27 | .github 28 | sparse-checkout-cone-mode: false 29 | 30 | - name: Get version 31 | id: get-version 32 | uses: ./.github/actions/version 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | *.o 3 | *.so 4 | *.a 5 | *.deb 6 | src/libpiler.so.0* 7 | src/piler 8 | src/pilerconf 9 | src/piler-smtp 10 | src/pileraget 11 | src/pilerexport 12 | src/pilerget 13 | src/pilerimport 14 | src/pilerstats 15 | src/pilertest 16 | src/reindex 17 | unit_tests/check_attachments 18 | unit_tests/check_decoder 19 | unit_tests/check_digest 20 | unit_tests/check_hash 21 | unit_tests/check_misc 22 | unit_tests/check_mydomains 23 | unit_tests/check_parser 24 | unit_tests/check_parser_utils 25 | unit_tests/check_rules 26 | unit_tests/smtp 27 | config.log 28 | config.status 29 | etc/piler.conf 30 | init.d/rc.piler 31 | init.d/rc.searchd 32 | params.h 33 | piler-config.h 34 | stamp-h1 35 | util/import.sh 36 | util/indexer.attachment.sh 37 | util/indexer.delta.sh 38 | util/indexer.main.sh 39 | util/postinstall.sh 40 | webui/config.php 41 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | # pre-commit run 4 | exclude: '^configure$' 5 | repos: 6 | - repo: https://github.com/pre-commit/pre-commit-hooks 7 | rev: v3.2.0 8 | hooks: 9 | - id: trailing-whitespace 10 | - id: end-of-file-fixer 11 | - id: check-yaml 12 | - id: check-added-large-files 13 | - repo: https://github.com/hadolint/hadolint 14 | rev: v2.10.0 15 | hooks: 16 | - id: hadolint 17 | - repo: https://github.com/shellcheck-py/shellcheck-py 18 | rev: v0.8.0.4 19 | hooks: 20 | - id: shellcheck 21 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jsuto 2 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | The FSF.hu Foundation (http://fsf.hu/) supported and donated piler within the 2 | "Free Software Application 2011 project." (http://fsf.hu/2011/09/27/szabad-szoftver-palyazat-2011/) 3 | 4 | Nemeth Adam reviewed the web interface, and gave lots of useful hints and insights to 5 | improve the web ui of piler. 6 | 7 | Remi Smith improved the restricted auditor feature for a better multitenancy, 8 | and invented the default theme. 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | piler, an enterprise level email archiving application 2 | 3 | Copyright (C) 2012-2024, Janos SUTO 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, version 3 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![test workflow](https://github.com/jsuto/piler/actions/workflows/test.yaml/badge.svg) 2 | 3 | piler is an open source email archival application. Please visit https://www.mailpiler.org/ for more. 4 | 5 | Features: 6 | 7 | - built-in smtp server 8 | - archival rules 9 | - retention rules 10 | - legal hold 11 | - message and attachment deduplication 12 | - message compression 13 | - message encryption 14 | - digital fingerprinting and verification 15 | - full text search 16 | - simple and expert search 17 | - save search criteria 18 | - tagging emails 19 | - view, export, restore emails 20 | - bulk import/export messages 21 | - access control 22 | - AD / LDAP authentication 23 | - IMAP, POP3 authentication 24 | - single sign-on (SSO) 25 | - Google Apps support 26 | - Office 365 support 27 | - STARTTLS support 28 | - Google Authenticator support for 2-factor authentication 29 | - i18n 30 | - customisable theme 31 | - audit logs 32 | - search in audit logs 33 | - online status info 34 | - accounting 35 | - recognised formats: PST, EML, Maildir, mailbox 36 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Disclosure policy 2 | 3 | If you find a security issue, please contact the project owner at sj@acts.hu 4 | with the details (ie. piler version, details of the setup, how to exploit the 5 | vulnerability, etc). 6 | 7 | Please provide 30 days for verifying the vulnerability, fixing the issue, and 8 | notifying the piler users. 9 | 10 | Security configurations 11 | 12 | - Use https for the GUI 13 | - Reset the default passwords for admin and auditor 14 | - Use the smtp acl feature to restrict SMTP access to the archive, see https://mailpiler.com/smtp-acl-list/ 15 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.4.8 2 | -------------------------------------------------------------------------------- /build/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 3 | docker buildx rm builder 4 | docker buildx create --name builder --driver docker-container --use 5 | docker buildx inspect --bootstrap 6 | ``` 7 | 8 | ``` 9 | docker buildx build --push --platform linux/amd64,linux/arm64 -t sutoj/builder:noble . 10 | ``` 11 | -------------------------------------------------------------------------------- /build/fpm-piler-before-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | [[ $(id -g piler 2>/dev/null) ]] || groupadd piler 8 | [[ $(id -u piler 2>/dev/null) ]] || useradd -g piler -d /var/piler -s /bin/bash piler 9 | -------------------------------------------------------------------------------- /build/piler.conf: -------------------------------------------------------------------------------- 1 | archive_emails_not_having_message_id=0 2 | backlog=20 3 | cipher_list=ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS 4 | default_retention_days=2557 5 | enable_chunking=1 6 | enable_cjk=0 7 | encrypt_messages=1 8 | extra_to_field=X-Envelope-To: 9 | extract_attachments=1 10 | listen_addr=0.0.0.0 11 | listen_port=25 12 | max_requests_per_child=1000 13 | memcached_servers=127.0.0.1 14 | memcached_ttl=3600 15 | min_message_size=200 16 | min_word_len=1 17 | mysql_connect_timeout=2 18 | mysqldb=piler1 19 | mysqlpwd=piler123 20 | mysqlsocket=/var/run/mysqld/mysqld.sock 21 | mysqluser=piler 22 | number_of_worker_processes=3 23 | pemfile=/etc/piler/piler.pem 24 | pidfile=/var/run/piler/piler.pid 25 | piler_header_field=X-piler-id: 26 | queuedir=/var/piler/store 27 | rtindex=1 28 | spam_header_line= 29 | sphxhost=127.0.0.1 30 | sphxport=9306 31 | syslog_recipients=0 32 | tls_enable=1 33 | username=piler 34 | verbosity=5 35 | workdir=/var/piler/tmp 36 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | mime/mime.types: MIME types from the apache 2.2.x distribution 2 | -------------------------------------------------------------------------------- /contrib/imap/Makefile.in: -------------------------------------------------------------------------------- 1 | SHELL = @SHELL@ 2 | 3 | prefix = @prefix@ 4 | exec_prefix = @exec_prefix@ 5 | bindir = @bindir@ 6 | sbindir = @sbindir@ 7 | includedir = @includedir@ 8 | libdir = @libdir@ 9 | libexecdir = @libexecdir@ 10 | srcdir = @srcdir@ 11 | sysconfdir = @sysconfdir@ 12 | mandir = @mandir@ 13 | datarootdir = @datarootdir@ 14 | localstatedir = @localstatedir@ 15 | 16 | CC = @CC@ 17 | CFLAGS = @CFLAGS@ @CPPFLAGS@ 18 | DEFS = @defs@ 19 | INCDIR = -I. -I.. -I../.. -I../../src -I../src @INCDIR@ @mysql_includes@ 20 | LIBDIR = -L. @LIBDIR@ @LDFLAGS@ -L../src -L../../src 21 | LIBS = @LIBS@ @mysql_libs@ 22 | RUNNING_USER = @RUNNING_USER@ 23 | RUNNING_GROUP = `@id_bin@ -gn $(RUNNING_USER)` 24 | OBJS = 25 | 26 | INSTALL = @INSTALL@ 27 | 28 | all: $(OBJS) imap-seen 29 | 30 | imap-seen: imap-seen.c ../../src/libpiler.a 31 | $(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $< -lpiler $(LIBS) $(LIBDIR) 32 | 33 | 34 | install: 35 | 36 | clean: 37 | rm -f imap-seen 38 | 39 | distclean: clean 40 | rm -f Makefile 41 | -------------------------------------------------------------------------------- /contrib/o365/config.py: -------------------------------------------------------------------------------- 1 | DEBUG = False 2 | SKIP_FOLDERS = ['Deleted Items', 'Drafts', 'Junk Email'] 3 | client_id = ".........." 4 | client_secret = "......" 5 | tenant_id = "......." 6 | -------------------------------------------------------------------------------- /contrib/o365/requirements.txt: -------------------------------------------------------------------------------- 1 | msal 2 | -------------------------------------------------------------------------------- /contrib/pop3/batch-import-without-removing.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | counter_file="pop3-position" 4 | COUNTER=0 5 | STEPS=10 6 | 7 | export PATH=$PATH:/usr/bin:/usr/local/bin 8 | 9 | if [ ! -f $counter_file ]; then COUNTER=1; else COUNTER=`cat $counter_file`; fi 10 | 11 | 12 | pilerimport -K pop3.youromain.com -u username -p password -s `cat $counter_file` -b $STEPS 13 | 14 | 15 | COUNTER=`expr $COUNTER + $STEPS` 16 | 17 | printf "%d" "$COUNTER" > $counter_file 18 | -------------------------------------------------------------------------------- /contrib/proxmox-lxc/README: -------------------------------------------------------------------------------- 1 | You nedd proxmox with lxc 2 | 3 | Fill out conf file first and provide public key 4 | 5 | It automatically 6 | - downloads the latest debian template 7 | - provides a container 8 | - installs piler until the post installation step 9 | - gives a self signed certificate 10 | -------------------------------------------------------------------------------- /contrib/selinux/README: -------------------------------------------------------------------------------- 1 | setsebool -P allow_httpd_mod_auth_ntlm_winbind on 2 | setsebool -P httpd_can_network_connect on 3 | setsebool -P httpd_ssi_exec on 4 | 5 | setsebool -P httpd_use_nfs 1 (in case of nfs) 6 | 7 | 8 | checkmodule -M -m -o piler.mod piler.te 9 | semodule_package -o piler.pp -m piler.mod 10 | semodule -i piler.pp 11 | 12 | chcon -R --type=httpd_sys_rw_content_t /var/piler/www/tmp 13 | 14 | -------------------------------------------------------------------------------- /contrib/webserver/piler-apache-2.x.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName HOSTNAME 3 | 4 | DocumentRoot "/var/piler/www" 5 | 6 | 7 | Require all granted 8 | 9 | AllowOverride all 10 | 11 | 12 | ErrorLog "/var/log/apache2/HOSTNAME-error_log" 13 | CustomLog "/var/log/apache2/HOSTNAME-access_log" common 14 | 15 | 16 | -------------------------------------------------------------------------------- /cppcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o nounset 4 | set -o errexit 5 | set -o pipefail 6 | 7 | cppcheck -DHAVE_PDFTOTEXT -DHAVE_PPTHTML -DHAVE_TNEF -DHAVE_UNRTF -DHAVE_XLS2CSV -DHAVE_CATPPT -DHAVE_CATDOC -DHAVE_ZIP -D_GNU_SOURCE -DHAVE_DAEMON -DHAVE_TRE -DNEED_MYSQL --error-exitcode=1 --enable=all --suppressions-list=suppressions.txt --force src/ unit_tests/ 8 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | ## How to run piler 2 | 3 | Edit the variables in docker-compose.yaml, then run 4 | 5 | ``` 6 | docker compose up -d 7 | ``` 8 | 9 | ## How to build the image for yourself 10 | 11 | Pick the latest deb package from Github releases (https://github.com/jsuto/piler/releases) 12 | and use it as the PACKAGE build argument, eg. 13 | 14 | ``` 15 | docker buildx build --load --platform linux/amd64 -t sutoj/piler:1.4.5 --build-arg PACKAGE=piler_1.4.5-jammy-ba34363 . 16 | ``` 17 | -------------------------------------------------------------------------------- /docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | IMAGE_NAME="sutoj/piler:test" 8 | 9 | if [[ $# -ne 1 ]]; then echo "ERROR: missing package name" 1>&2; exit 1; fi 10 | 11 | docker buildx build --load --build-arg PACKAGE="$1" -t "$IMAGE_NAME" . 12 | -------------------------------------------------------------------------------- /docker/piler.cnf: -------------------------------------------------------------------------------- 1 | [mariadb] 2 | 3 | innodb_buffer_pool_size = 256M 4 | innodb_flush_log_at_trx_commit=1 5 | innodb_log_buffer_size=64M 6 | innodb_log_file_size=64M 7 | innodb_read_io_threads=4 8 | innodb_write_io_threads=4 9 | innodb_log_files_in_group=2 10 | 11 | innodb_file_per_table 12 | -------------------------------------------------------------------------------- /etc/config-site.dist.php: -------------------------------------------------------------------------------- 1 | LOCALSTATEDIR/piler/stat/error 9 | 10 | ### optional 11 | 30 6 * * * /usr/bin/php LIBEXECDIR/piler/generate_stats.php --webui LOCALSTATEDIR/piler/www >/dev/null 12 | */5 * * * * LIBEXECDIR/piler/import.sh 13 | 14 | ### PILEREND 15 | -------------------------------------------------------------------------------- /etc/smtp.acl.example: -------------------------------------------------------------------------------- 1 | # Allow office365 servers. See the below URI for more 2 | # https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide 3 | # 4 | # Anything is not listed below will be rejected 5 | # 6 | 40.92.0.0/15 permit 7 | 40.107.0.0/16 permit 8 | 52.100.0.0/14 permit 9 | 104.47.0.0/17 permit 10 | -------------------------------------------------------------------------------- /init.d/Makefile.in: -------------------------------------------------------------------------------- 1 | SHELL = @SHELL@ 2 | 3 | prefix = @prefix@ 4 | exec_prefix = @exec_prefix@ 5 | bindir = @bindir@ 6 | sbindir = @sbindir@ 7 | includedir = @includedir@ 8 | libdir = @libdir@ 9 | libexecdir = @libexecdir@ 10 | srcdir = @srcdir@ 11 | sysconfdir = @sysconfdir@ 12 | mandir = @mandir@ 13 | datarootdir = @datarootdir@ 14 | localstatedir = @localstatedir@ 15 | 16 | CC = @CC@ 17 | CFLAGS = @CFLAGS@ @CPPFLAGS@ 18 | DEFS = @defs@ 19 | INCDIR = -I. -I../.. -I../../src @INCDIR@ @sql_includes@ 20 | LIBDIR = -L. @LIBDIR@ @LDFLAGS@ -L../../src 21 | LIBS = @LIBS@ @sql_libs@ 22 | 23 | INSTALL = @INSTALL@ 24 | 25 | all: 26 | sed -e "s%SBINDIR%$(sbindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.piler.in > $(srcdir)/rc.piler 27 | sed -e "s%BINDIR%$(bindir)%" -e "s%SYSCONFDIR%$(sysconfdir)%" $(srcdir)/rc.searchd.in > $(srcdir)/rc.searchd 28 | 29 | 30 | install: 31 | $(INSTALL) -m 0755 $(srcdir)/rc.piler $(DESTDIR)/etc/init.d/rc.piler 32 | $(INSTALL) -m 0755 $(srcdir)/rc.searchd $(DESTDIR)/etc/init.d/rc.searchd 33 | 34 | clean: 35 | rm -f rc.piler rc.searchd 36 | 37 | distclean: clean 38 | rm -f Makefile 39 | -------------------------------------------------------------------------------- /mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.2 2000/01/10 23:36:14 bagder Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 1>&2 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /piler-config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * piler-config.h.in, SJ 3 | */ 4 | 5 | #define COMMIT_HASH "" 6 | #define VERSION "x.x.x" 7 | 8 | #define CONFDIR "/usr/local/etc" 9 | #define DATADIR "/usr/local/var" 10 | #define DATAROOTDIR "/usr/local/share" 11 | 12 | #define KEYFILE CONFDIR "/piler/piler.key" 13 | #define LICENCE_SIGNATURE_FILE CONFDIR "/piler/piler.lic" 14 | 15 | #define MESSAGE_ID_DEDUP_FILE DATAROOTDIR "/piler/deduphelper" 16 | 17 | #define HAVE_DAEMON 1 18 | 19 | #undef TIMEOUT_BINARY 20 | 21 | #undef HAVE_PDFTOTEXT 22 | #undef HAVE_CATDOC 23 | #undef HAVE_CATPPT 24 | #undef HAVE_XLS2CSV 25 | #undef HAVE_PPTHTML 26 | #undef HAVE_UNRTF 27 | #undef HAVE_TNEF 28 | #undef HAVE_ZIP 29 | 30 | #undef HAVE_TWEAK_SENT_TIME 31 | 32 | #undef HAVE_SUPPORT_FOR_COMPAT_STORAGE_LAYOUT 33 | -------------------------------------------------------------------------------- /src/decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * decoder.h, SJ 3 | */ 4 | 5 | #ifndef _DECODER_H 6 | #define _DECODER_H 7 | 8 | int decodeBase64(char *p); 9 | int decode_base64_to_buffer(char *p, int plen, unsigned char *b, int blen); 10 | void decodeQP(char *p); 11 | void decodeHTML(char *p, int utf8); 12 | void decodeURL(char *p); 13 | int utf8_encode(char *inbuf, int inbuflen, char *outbuf, int outbuflen, char *encoding); 14 | char *url_encode(const char *str); 15 | 16 | #endif /* _DECODER_H */ 17 | -------------------------------------------------------------------------------- /src/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hash.h, SJ 3 | */ 4 | 5 | #ifndef _HASH_H 6 | #define _HASH_H 7 | 8 | #include "cfg.h" 9 | #include "defs.h" 10 | 11 | 12 | void inithash(struct node *xhash[]); 13 | void clearhash(struct node *xhash[]); 14 | struct node *makenewnode(char *s); 15 | int addnode(struct node *xhash[], char *s); 16 | struct node *findnode(struct node *xhash[], char *s); 17 | int is_substr_in_hash(struct node *xhash[], char *s); 18 | unsigned int DJBHash(char* str, unsigned int len); 19 | 20 | #endif /* _HASH_H */ 21 | -------------------------------------------------------------------------------- /src/memc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * memc.h, SJ 3 | */ 4 | 5 | #ifndef _MEMC_H 6 | #define _MEMC_H 7 | 8 | void memcached_init(struct memcached_server *ptr, char *server_ip, int server_port); 9 | int set_socket_options(struct memcached_server *ptr); 10 | int memcached_connect(struct memcached_server *ptr); 11 | int memcached_shutdown(struct memcached_server *ptr); 12 | int memcached_add(struct memcached_server *ptr, char *cmd, char *key, char *value, unsigned int valuelen, unsigned int flags, unsigned long expiry); 13 | int memcached_increment(struct memcached_server *ptr, char *key, unsigned long long value, unsigned long long *result); 14 | char *memcached_get(struct memcached_server *ptr, char *key, unsigned int *len, unsigned int *flags); 15 | int memcached_mget(struct memcached_server *ptr, char *key); 16 | char *memcached_fetch_result(struct memcached_server *ptr, char *key, char *value, unsigned int *flags); 17 | 18 | #endif /* _MEMC_H */ 19 | -------------------------------------------------------------------------------- /src/pilerget.c: -------------------------------------------------------------------------------- 1 | /* 2 | * pilerget.c, SJ 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | int main(int argc, char **argv){ 20 | int readkey=1; 21 | struct session_data sdata; 22 | struct config cfg; 23 | 24 | 25 | if(argc < 2){ 26 | printf("usage: %s \n", argv[0]); 27 | exit(1); 28 | } 29 | 30 | (void) openlog("pilerget", LOG_PID, LOG_MAIL); 31 | 32 | cfg = read_config(CONFIG_FILE); 33 | 34 | if(argc >= 3){ 35 | readkey = 0; 36 | cfg.encrypt_messages = 0; 37 | } 38 | 39 | if(readkey == 1 && read_key(&cfg)){ 40 | printf("%s\n", ERR_READING_KEY); 41 | return 1; 42 | } 43 | 44 | 45 | if(open_database(&sdata, &cfg) == ERR) return 0; 46 | 47 | 48 | snprintf(sdata.ttmpfile, SMALLBUFSIZE-1, "%s", argv[1]); 49 | snprintf(sdata.filename, SMALLBUFSIZE-1, "%s", sdata.ttmpfile); 50 | retrieve_email_from_archive(&sdata, stdout, &cfg); 51 | 52 | 53 | close_database(&sdata); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /src/rules.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rules.h, SJ 3 | */ 4 | 5 | #ifndef _RULES_H 6 | #define _RULES_H 7 | 8 | #include "defs.h" 9 | 10 | void load_rules(struct session_data *sdata, struct node *xhash[], char *table); 11 | int append_rule(struct node *xhash[], struct rule_cond *rule_cond); 12 | struct rule *create_rule_item(struct rule_cond *rule_cond); 13 | char *check_against_ruleset(struct node *xhash[], struct parser_state *state, int size, int spam); 14 | time_t query_retain_period(struct data *data, struct parser_state *state, int size, int spam, struct config *cfg); 15 | int get_folder_id_by_rule(struct data *data, struct parser_state *state, int size, int spam, struct config *cfg); 16 | int check_size_rule(int message_size, int size, char *_size); 17 | int check_spam_rule(int is_spam, int spam); 18 | int check_attachment_rule(struct parser_state *state, struct rule *rule); 19 | 20 | void initrules(struct node *xhash[]); 21 | void clearrules(struct node *xhash[]); 22 | 23 | #endif /* _RULES_H */ 24 | -------------------------------------------------------------------------------- /src/screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * screen.h, SJ 3 | */ 4 | 5 | #ifndef _SCREEN_H 6 | #define _SCREEN_H 7 | 8 | #include "defs.h" 9 | 10 | void init_smtp_acl(struct smtp_acl *smtp_acl[]); 11 | void clear_smtp_acl(struct smtp_acl *smtp_acl[]); 12 | int add_smtp_acl(struct smtp_acl *smtp_acl[], char *network_str, struct smtp_acl *acl); 13 | void load_smtp_acl(struct smtp_acl *smtp_acl[]); 14 | int is_blocked_by_pilerscreen(struct smtp_acl *smtp_acl[], char *ipaddr); 15 | 16 | #endif /* _SCREEN_H */ 17 | -------------------------------------------------------------------------------- /src/sig.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sig.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | void sig_block(int sig){ 12 | sigset_t ss; 13 | sigemptyset(&ss); 14 | sigaddset(&ss,sig); 15 | sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); 16 | } 17 | 18 | void sig_unblock(int sig){ 19 | sigset_t ss; 20 | sigemptyset(&ss); 21 | sigaddset(&ss,sig); 22 | sigprocmask(SIG_UNBLOCK, &ss, (sigset_t *) 0); 23 | } 24 | 25 | void sig_catch(int sig, void (*f)()){ 26 | struct sigaction sa; 27 | sa.sa_handler = f; 28 | sa.sa_flags = 0; 29 | sigemptyset(&sa.sa_mask); 30 | sigaction(sig, &sa, (struct sigaction *) 0); 31 | } 32 | 33 | void sig_uncatch(int sig){ 34 | void (*sig_defaulthandler)() = SIG_DFL; 35 | sig_catch(sig, sig_defaulthandler); 36 | } 37 | 38 | void sig_pause(){ 39 | sigset_t ss; 40 | sigemptyset(&ss); 41 | sigsuspend(&ss); 42 | } 43 | 44 | int wait_nohang(int *wstat){ 45 | return waitpid(-1, wstat, WNOHANG); 46 | } 47 | 48 | signal_func *set_signal_handler(int signo, signal_func * func){ 49 | struct sigaction act, oact; 50 | 51 | act.sa_handler = func; 52 | sigemptyset (&act.sa_mask); 53 | act.sa_flags = 0; 54 | 55 | if(sigaction(signo, &act, &oact) < 0) return SIG_ERR; 56 | 57 | return oact.sa_handler; 58 | } 59 | -------------------------------------------------------------------------------- /src/sig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sig.h, SJ 3 | */ 4 | 5 | #ifndef _SIG_H 6 | #define _SIG_H 7 | 8 | typedef void signal_func (int); 9 | 10 | void sig_block(int sig); 11 | void sig_unblock(int sig); 12 | void sig_catch(int sig, void (*f)()); 13 | void sig_uncatch(int sig); 14 | void sig_pause(); 15 | int wait_nohang(int *wstat); 16 | signal_func *set_signal_handler(int signo, signal_func * func); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/sql.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sql.h, SJ 3 | */ 4 | 5 | #ifndef _SQL_H 6 | #define _SQL_H 7 | 8 | 9 | int open_database(struct session_data *sdata, struct config *cfg); 10 | int open_sphx(struct session_data *sdata, struct config *cfg); 11 | void close_database(struct session_data *sdata); 12 | void close_sphx(struct session_data *sdata); 13 | int prepare_sql_statement(struct session_data *sdata, struct sql *sql, char *s); 14 | void p_query(struct session_data *sdata, char *s); 15 | int p_exec_stmt(struct session_data *sdata, struct sql *sql); 16 | int p_store_results(struct sql *sql); 17 | int p_fetch_results(struct sql *sql); 18 | void p_free_results(struct sql *sql); 19 | void p_bind_init(struct sql *sql); 20 | uint64 p_get_insert_id(struct sql *sql); 21 | int p_get_affected_rows(struct sql *sql); 22 | void close_prepared_statement(struct sql *sql); 23 | 24 | 25 | #endif /* _PILER_H */ 26 | -------------------------------------------------------------------------------- /src/tai.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "tai.h" 6 | 7 | 8 | 9 | void tai_pack(char *s, struct tai *t){ 10 | uint64 x = t->x; 11 | 12 | s[7] = x & 255; x >>= 8; 13 | s[6] = x & 255; x >>= 8; 14 | s[5] = x & 255; x >>= 8; 15 | s[4] = x & 255; x >>= 8; 16 | s[3] = x & 255; x >>= 8; 17 | s[2] = x & 255; x >>= 8; 18 | s[1] = x & 255; x >>= 8; 19 | s[0] = x; 20 | } 21 | 22 | 23 | void taia_pack(char *s, struct taia *t){ 24 | unsigned long x; 25 | 26 | tai_pack(s, &t->sec); 27 | s += 8; 28 | 29 | x = t->atto; 30 | s[7] = x & 255; x >>= 8; 31 | s[6] = x & 255; x >>= 8; 32 | s[5] = x & 255; x >>= 8; 33 | s[4] = x; 34 | 35 | x = t->nano; 36 | s[3] = x & 255; x >>= 8; 37 | s[2] = x & 255; x >>= 8; 38 | s[1] = x & 255; x >>= 8; 39 | s[0] = x; 40 | } 41 | 42 | 43 | void taia_now(struct taia *t){ 44 | struct timeval now; 45 | 46 | gettimeofday(&now,(struct timezone *) 0); 47 | 48 | t->sec.x = 4611686018427387914ULL + (uint64)now.tv_sec; 49 | t->nano = 1000 * now.tv_usec + 500; 50 | t->atto = 0; 51 | } 52 | -------------------------------------------------------------------------------- /src/tai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tai.h, SJ 3 | */ 4 | 5 | #ifndef _TAI_H 6 | #define _TAI_H 7 | 8 | #include "config.h" 9 | 10 | #define TAI_PACK 8 11 | #define TAIA_PACK 16 12 | #define TIMESTAMP 25 13 | 14 | struct tai { 15 | uint64 x; 16 | }; 17 | 18 | struct taia { 19 | struct tai sec; 20 | unsigned long nano; /* 0...999999999 */ 21 | unsigned long atto; /* 0...999999999 */ 22 | }; 23 | 24 | 25 | void taia_now(struct taia *t); 26 | void taia_pack(char *s, struct taia *t); 27 | 28 | #endif /* _TAI_H */ 29 | -------------------------------------------------------------------------------- /suppressions.txt: -------------------------------------------------------------------------------- 1 | identicalConditionAfterEarlyExit:src/tokenizer.c:40 2 | invalidPrintfArgType_s:src/extract.c:175 3 | invalidPrintfArgType_s:src/misc.c:39 4 | invalidPrintfArgType_s:src/misc.c:43 5 | invalidPrintfArgType_s:src/misc.c:47 6 | invalidPrintfArgType_s:src/misc.c:51 7 | invalidPrintfArgType_s:src/misc.c:55 8 | invalidPrintfArgType_s:src/misc.c:59 9 | invalidPrintfArgType_s:src/misc.c:63 10 | redundantAssignment:src/imap.c:47 11 | unusedFunction:src/sig.c:33 12 | unusedFunction:src/sig.c:38 13 | unusedFunction:src/sig.c:44 14 | -------------------------------------------------------------------------------- /systemd/Makefile.in: -------------------------------------------------------------------------------- 1 | SHELL = @SHELL@ 2 | 3 | prefix = @prefix@ 4 | exec_prefix = @exec_prefix@ 5 | bindir = @bindir@ 6 | sbindir = @sbindir@ 7 | includedir = @includedir@ 8 | libdir = @libdir@ 9 | libexecdir = @libexecdir@ 10 | srcdir = @srcdir@ 11 | sysconfdir = @sysconfdir@ 12 | mandir = @mandir@ 13 | datarootdir = @datarootdir@ 14 | localstatedir = @localstatedir@ 15 | 16 | CC = @CC@ 17 | CFLAGS = @CFLAGS@ @CPPFLAGS@ 18 | DEFS = @defs@ 19 | INCDIR = -I. -I../.. -I../../src @INCDIR@ @sql_includes@ 20 | LIBDIR = -L. @LIBDIR@ @LDFLAGS@ -L../../src 21 | LIBS = @LIBS@ @sql_libs@ 22 | RUNNING_USER = @RUNNING_USER@ 23 | RUNNING_GROUP = `@id_bin@ -gn $(RUNNING_USER)` 24 | 25 | INSTALL = @INSTALL@ 26 | 27 | all: 28 | echo all 29 | 30 | install: 31 | $(INSTALL) -m 0644 $(srcdir)/piler.service $(DESTDIR)$(libexecdir)/piler/piler.service 32 | $(INSTALL) -m 0644 $(srcdir)/piler-smtp.service $(DESTDIR)$(libexecdir)/piler/piler-smtp.service 33 | $(INSTALL) -m 0644 $(srcdir)/pilersearch.service $(DESTDIR)$(libexecdir)/piler/pilersearch.service 34 | 35 | clean: 36 | echo clean 37 | 38 | distclean: clean 39 | rm -f Makefile 40 | -------------------------------------------------------------------------------- /systemd/piler-smtp.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Piler SMTP server 3 | After=network.target auditd.service 4 | 5 | [Service] 6 | ExecStart=/usr/sbin/piler-smtp -d 7 | KillMode=process 8 | Restart=on-failure 9 | RestartPreventExitStatus=255 10 | Type=forking 11 | User=root 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | Alias=piler-smtp.service 16 | -------------------------------------------------------------------------------- /systemd/piler.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Piler daemon 3 | After=network.target mariadb.service 4 | 5 | [Service] 6 | ExecStart=/usr/sbin/piler -d 7 | PIDFile=/var/run/piler/piler.pid 8 | KillMode=process 9 | Restart=on-failure 10 | RestartPreventExitStatus=255 11 | Type=forking 12 | User=root 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | Alias=piler.service 17 | -------------------------------------------------------------------------------- /systemd/pilersearch.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Searchd for piler daemon 3 | After=network.target mariadb.service 4 | 5 | [Service] 6 | ExecStart=/usr/bin/searchd --config /etc/piler/manticore.conf 7 | ExecStop=/usr/bin/searchd --config /etc/piler/manticore.conf --stopwait 8 | PIDFile=/var/run/piler/searchd.pid 9 | KillMode=process 10 | Restart=on-failure 11 | RestartPreventExitStatus=255 12 | Type=forking 13 | User=piler 14 | RuntimeDirectory=piler 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | Alias=pilersearch.service 19 | -------------------------------------------------------------------------------- /tests/addons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | apt-get update 4 | apt-get install -y vim telnet netcat-openbsd 5 | -------------------------------------------------------------------------------- /tests/config-site-extras.php: -------------------------------------------------------------------------------- 1 | $config['TSA_URL'] = 'https://freetsa.org/tsr'; 2 | $config['TSA_PUBLIC_KEY_FILE'] = '/etc/piler/tsa.pem'; 3 | $config['TSA_START_ID'] = 1; 4 | $config['TSA_STAMP_REQUEST_UNIT_SIZE'] = 2892; 5 | $config['TSA_VERIFY_CERTIFICATE'] = false; 6 | $config['ENABLE_IMAP_AUTH'] = 1; 7 | $config['IMAP_HOST'] = 'imap.aaa.fu'; 8 | $config['IMAP_PORT'] = 143; 9 | $config['IMAP_SSL'] = false; 10 | $config['RT'] = 1; 11 | $config['SPHINX_MAIN_INDEX'] = 'piler1'; 12 | $config['ENABLE_DELETE'] = 1; 13 | $config['NEED_TO_APPROVE_DELETE'] = 0; 14 | $config['SMARTHOST'] = 'smarthost.aaa.fu'; 15 | $config['ENABLE_PDF_DOWNLOAD'] = 1; 16 | $config['PATH_PREFIX'] = '/'; 17 | -------------------------------------------------------------------------------- /tests/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o nounset 4 | set -o errexit 5 | set -o pipefail 6 | 7 | SCRIPT_PATH="$(readlink -f "$0")" 8 | SCRIPT_DIR="${SCRIPT_PATH%/*}" 9 | 10 | pushd "$SCRIPT_DIR" 11 | docker exec -i "$CONTAINER" bash -c "cat >> /etc/piler/config-site.php" < config-site-extras.php 12 | docker cp setup.sql "${CONTAINER}:/tmp" 13 | docker exec "$CONTAINER" bash -c 'mysql --defaults-file=/etc/piler/.my.cnf < /tmp/setup.sql' 14 | docker exec "$CONTAINER" bash -c "sed -i 's/verifyssl=1/verifyssl=0/' /etc/piler/piler.conf" 15 | docker exec "$CONTAINER" /etc/init.d/rc.piler reload 16 | docker exec "$CONTAINER" wget -qO /etc/piler/tsa.pem --no-check-certificate https://freetsa.org/files/cacert.pem 17 | popd 18 | -------------------------------------------------------------------------------- /unit_tests/6.eml: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | X-Original-To: sj@acts.hu 3 | X-Envelope-To: sj@acts.hu 4 | Received: from mcqw.com (unknown [111.177.117.51]) 5 | by lithium.acts.hu (Postfix) with ESMTP id 12AC620EBC9 6 | for ; Sun, 1 Nov 2015 15:34:10 +0100 (CET) 7 | Received: from cloudvm-1e7a8fc ([127.0.0.1]) by localhost via TCP with ESMTPA; Sun, 01 Nov 2015 22:26:34 +0800 8 | MIME-Version: 1.0 9 | From: "JML lighting" 10 | Sender: "JML lighting" 11 | To: sj@acts.hu 12 | Reply-To: "JML lighting" 13 | Date: 1 Nov 2015 22:26:34 +0800 14 | Subject: =?utf-8?B?TmV3IGRlc2lnbiB1bHRyYSBzbGltIGxlZCAgcGFuZWwgbGlnaHQ=?= 15 | Content-Type: text/html; charset=utf-8 16 | Content-Transfer-Encoding: base64 17 | Message-Id: <20151101142653.111156815AF6D@acts.hu> 18 | -------------------------------------------------------------------------------- /unit_tests/7.eml: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | X-Original-To: sj@acts.hu 3 | X-Envelope-To: sj@acts.hu 4 | Received: from mcqw.com (unknown [111.177.117.51]) 5 | by lithium.acts.hu (Postfix) with ESMTP id 12AC620EBC9 6 | for ; Sun, 1 Nov 2015 15:34:10 +0100 (CET) 7 | Received: from cloudvm-1e7a8fc ([127.0.0.1]) by localhost via TCP with ESMTPA; Sun, 01 Nov 2015 22:26:34 +0800 8 | MIME-Version: 1.0 9 | From: "JML lighting" 10 | Sender: "JML lighting" 11 | To: sj@acts.hu 12 | Reply-To: "JML lighting" 13 | Date: 1 Nov 2015 22:26:34 +0800 14 | Subject: =?utf-8?B?TmV3IGRlc2lnbiB1bHRyYSBzbGltIGxlZCAgcGFuZWwgbGlnaHQ=?= 15 | Content-Type: text/html; charset=utf-8 16 | Content-Transfer-Encoding: base64 17 | Message-Id: <20151101142653.111156815AF6D@acts.hu> 18 | 19 | -------------------------------------------------------------------------------- /unit_tests/8.eml: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | X-Original-To: sj@acts.hu 3 | X-Envelope-To: sj@acts.hu 4 | Received: from mcqw.com (unknown [111.177.117.51]) 5 | by lithium.acts.hu (Postfix) with ESMTP id 12AC620EBC9 6 | for ; Sun, 1 Nov 2015 15:34:10 +0100 (CET) 7 | Received: from cloudvm-1e7a8fc ([127.0.0.1]) by localhost via TCP with ESMTPA; Sun, 01 Nov 2015 22:26:34 +0800 8 | MIME-Version: 1.0 9 | From: "JML lighting" 10 | Sender: "JML lighting" 11 | To: sj@acts.hu 12 | Reply-To: "JML lighting" 13 | Date: 1 Nov 2015 22:26:34 +0800 14 | Subject: =?utf-8?B?TmV3IGRlc2lnbiB1bHRyYSBzbGltIGxlZCAgcGFuZWwgbGlnaHQ=?= 15 | Content-Type: text/html; charset=utf-8 16 | Content-Transfer-Encoding: base64 17 | Message-Id: <20151101142653.111156815AF6D@acts.hu> 18 | 19 | 20 | -------------------------------------------------------------------------------- /unit_tests/common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * common.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "../src/piler.h" 13 | 14 | 15 | int setup_and_parse_message(struct session_data *sdata, struct parser_state *state, struct data *data, char *filename, struct config *cfg){ 16 | struct stat st; 17 | 18 | if(stat(filename, &st) != 0){ 19 | fprintf(stderr, "%s is not found, skipping\n", filename); 20 | return 1; 21 | } 22 | 23 | init_session_data(sdata, cfg); 24 | 25 | sdata->delivered = 0; 26 | sdata->tot_len = st.st_size; 27 | 28 | snprintf(sdata->ttmpfile, SMALLBUFSIZE-1, "%s", filename); 29 | snprintf(sdata->filename, SMALLBUFSIZE-1, "%s", filename); 30 | snprintf(sdata->tmpframe, SMALLBUFSIZE-1, "%s.m", filename); 31 | 32 | *state = parse_message(sdata, 1, data, cfg); 33 | post_parse(sdata, state, cfg); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /unit_tests/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | set -x 7 | 8 | SCRIPT_PATH="$(readlink -f "$0")" 9 | SCRIPT_DIR="${SCRIPT_PATH%/*}" 10 | 11 | echo "Running unit tests" 12 | 13 | export LD_LIBRARY_PATH=../src 14 | 15 | pushd "$SCRIPT_DIR" 16 | 17 | setup_mysql() { 18 | if [[ "$DISTRO" =~ ^jammy|noble$ ]]; then 19 | service mariadb start 20 | else 21 | service mysql start 22 | fi 23 | 24 | mysql -u piler -ppiler123 piler1 < ../util/db-mysql.sql 25 | } 26 | 27 | run_smtp_tests() { 28 | mkdir -p /var/piler/store/00/piler /var/piler/tmp /var/piler/manticore 29 | chown -R piler:piler /var/piler/ 30 | ../src/piler-smtp -L 5 -d 31 | ./smtp -s 127.0.0.1 32 | } 33 | 34 | if [[ -v BUILD_NUMBER ]]; then 35 | setup_mysql 36 | fi 37 | 38 | ./check_parser_utils 39 | ./check_parser 40 | ./check_rules 41 | ./check_digest 42 | ./check_mydomains 43 | ./check_misc 44 | ./check_hash 45 | ./check_decoder 46 | ./check_attachments 47 | 48 | if [[ -v BUILD_NUMBER ]]; then run_smtp_tests; fi 49 | -------------------------------------------------------------------------------- /unit_tests/test.conf: -------------------------------------------------------------------------------- 1 | archive_emails_not_having_message_id=0 2 | archive_only_mydomains=0 3 | backlog=20 4 | cipher_list=ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS 5 | clamd_socket=/tmp/clamd 6 | default_retention_days=2557 7 | enable_cjk=0 8 | enable_folders=0 9 | encrypt_messages=1 10 | extra_to_field=X-Envelope-To: 11 | extract_attachments=1 12 | helper_timeout=20 13 | hostid=piler.example.com 14 | iv= 15 | listen_addr=0.0.0.0 16 | listen_port=25 17 | max_requests_per_child=1000 18 | memcached_servers=127.0.0.1 19 | memcached_to_db_interval=900 20 | memcached_ttl=86400 21 | min_word_len=1 22 | mmap_dedup_test=0 23 | mysql_connect_timeout=2 24 | mysqldb=piler1 25 | mysqlpwd=piler123 26 | mysqlsocket=/var/run/mysqld/mysqld.sock 27 | mysqluser=piler 28 | number_of_worker_processes=2 29 | pemfile=/usr/local/etc/piler.pem 30 | pidfile=/var/run/piler/piler.pid 31 | piler_header_field=X-piler-id: 32 | process_rcpt_to_addresses=0 33 | queuedir=./store 34 | server_id=0 35 | spam_header_line= 36 | syslog_recipients=0 37 | tls_enable=0 38 | tweak_sent_time_offset=0 39 | update_counters_to_memcached=0 40 | username=piler 41 | verbosity=1 42 | workdir=. 43 | -------------------------------------------------------------------------------- /util/config-site.php.in: -------------------------------------------------------------------------------- 1 | 0, 'RENAME TABLE `group` TO usergroup', 'SELECT 1 from dual'); 13 | PREPARE stmt FROM @query; 14 | EXECUTE stmt; 15 | -------------------------------------------------------------------------------- /util/import.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | 6 | export PATH=$PATH:/usr/libexec/piler:/usr/local/libexec/piler 7 | 8 | pushd /var/piler/imap 9 | 10 | [[ "${FLOCKER}" != "$0" ]] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" 11 | 12 | imapfetch.py -i -c SYSCONFDIR/piler/piler.conf 13 | -------------------------------------------------------------------------------- /util/indexer.attachment.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin 4 | DELTATMPFILE=/var/run/piler/delta.attachment.indexer.tmp 5 | INDEXER="indexer --config SYSCONFDIR/piler/sphinx.conf" 6 | PRIORITY=mail.error 7 | TOUCHFILE=/var/piler/stat/indexer.attachment 8 | 9 | if [ -f $DELTATMPFILE ]; then echo "INDEXER ERROR: att1 indexing is already running. It started at "`cat $DELTATMPFILE` | logger -p $PRIORITY ; exit 1; fi 10 | 11 | date > $DELTATMPFILE 12 | 13 | touch $TOUCHFILE 14 | 15 | function finish { 16 | rm -f $DELTATMPFILE 17 | } 18 | 19 | trap finish EXIT 20 | 21 | echo "INDEXER INFO: indexing att1 started" | logger -p $PRIORITY 22 | 23 | $INDEXER --quiet att1 --rotate 24 | 25 | echo "INDEXER INFO: indexing att1 finished" | logger -p $PRIORITY 26 | 27 | 28 | -------------------------------------------------------------------------------- /util/purge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o nounset 4 | set -o errexit 5 | set -o pipefail 6 | 7 | export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec/piler:/usr/local/libexec/piler 8 | TMPFILE=/var/run/piler/purge.tmp 9 | PURGE_BEACON=/var/piler/stat/purge 10 | 11 | if [[ -f $TMPFILE ]]; then exit 1; fi 12 | 13 | date > $TMPFILE 14 | 15 | function finish { 16 | rm -f $TMPFILE 17 | } 18 | 19 | trap finish EXIT 20 | 21 | touch $PURGE_BEACON 22 | 23 | pilerpurge.py 24 | -------------------------------------------------------------------------------- /util/refresh-token.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | # Based on the https://github.com/UvA-FNWI/M365-IMAP project 4 | 5 | from msal import ConfidentialClientApplication, SerializableTokenCache 6 | import sys 7 | 8 | 9 | ClientId = "c6843299-05c4-4c2e-9398-64dd42f14b6d" # Fix this value only 10 | ClientSecret = "" 11 | Scopes = ['https://outlook.office.com/IMAP.AccessAsUser.All'] 12 | AccessTokenFileName = "access_token" 13 | RefreshTokenFileName = "refresh_token" 14 | 15 | 16 | cache = SerializableTokenCache() 17 | app = ConfidentialClientApplication(ClientId, 18 | client_credential=ClientSecret, 19 | token_cache=cache, authority=None) 20 | 21 | old_refresh_token = open(RefreshTokenFileName, 'r').read() 22 | 23 | token = app.acquire_token_by_refresh_token(old_refresh_token, Scopes) 24 | 25 | 26 | if 'error' in token: 27 | print(token) 28 | sys.exit("Failed to get access token") 29 | 30 | with open(AccessTokenFileName, 'w') as f: 31 | f.write(token['access_token']) 32 | 33 | with open(RefreshTokenFileName, 'w') as f: 34 | f.write(token['refresh_token']) 35 | -------------------------------------------------------------------------------- /util/reindex.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o nounset 4 | set -o errexit 5 | set -o pipefail 6 | 7 | INSTALL_PREFIX=/usr/local 8 | THRESHOLD=100000000 9 | 10 | start_id=1 11 | stop_id=5000000 12 | 13 | while [[ $start_id -lt $stop_id ]]; do 14 | y=$(( start_id + 9999 )) 15 | echo $start_id $y 16 | "${INSTALL_PREFIX}/bin/reindex" -f $start_id -t $y -p 17 | "${INSTALL_PREFIX}/libexec/piler/indexer.delta.sh" 18 | start_id=$(( start_id + 10000 )) 19 | 20 | if [[ "$(stat -c %s /var/piler/sphinx/dailydelta1.spp)" -gt "$THRESHOLD" ]]; then 21 | "${INSTALL_PREFIX}/libexec/piler/indexer.main.sh" 22 | fi 23 | done 24 | -------------------------------------------------------------------------------- /webui/Zend/Mail/Exception.php: -------------------------------------------------------------------------------- 1 | { 9 | isResizing = true; 10 | document.body.classList.add('no-select'); 11 | }); 12 | 13 | document.addEventListener('mousemove', (e) => { 14 | if (!isResizing) return; 15 | let offsetY = e.clientY - containerPanes.getBoundingClientRect().top; 16 | upperPane.style.height = `${offsetY}px`; 17 | lowerPane.style.height = `calc(100% - ${offsetY + resizer.offsetHeight}px)`; 18 | }); 19 | 20 | document.addEventListener('mouseup', () => { 21 | isResizing = false; 22 | document.body.classList.remove('no-select'); 23 | }); 24 | -------------------------------------------------------------------------------- /webui/controller/audit/audit.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "audit/audit.tpl"; 10 | $this->layout = "common/layout-audit"; 11 | 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $this->load->model('audit/audit'); 16 | 17 | if(Registry::get('admin_user') == 0 && Registry::get('auditor_user') == 0) { 18 | die("go away"); 19 | } 20 | 21 | $this->render(); 22 | } 23 | 24 | } 25 | 26 | ?> 27 | -------------------------------------------------------------------------------- /webui/controller/audit/download.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "message/headers.tpl"; 10 | $this->layout = "common/layout-empty"; 11 | 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $this->load->model('audit/audit'); 16 | 17 | if(Registry::get('admin_user') == 0 && Registry::get('auditor_user') == 0) { 18 | die("go away"); 19 | } 20 | 21 | $this->document->title = $this->data['text_message']; 22 | 23 | header("Cache-Control: public, must-revalidate"); 24 | header("Pragma: no-cache"); 25 | header("Content-Type: application/octet-stream"); 26 | header("Content-Disposition: attachment; filename=audit-" . time() . ".csv"); 27 | header("Content-Transfer-Encoding: binary\n"); 28 | 29 | $this->model_audit_audit->print_audit_to_csv(); 30 | } 31 | 32 | 33 | } 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /webui/controller/audit/removal.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "audit/removal.tpl"; 10 | $this->layout = "common/layout-audit-removal"; 11 | 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $this->load->model('audit/removal'); 16 | 17 | if(Registry::get('admin_user') == 0 && Registry::get('auditor_user') == 0 && Registry::get('data_officer') == 0) { 18 | die("go away"); 19 | } 20 | 21 | $this->data['data'] = $this->model_audit_removal->get_pending_removals(); 22 | 23 | $this->render(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /webui/controller/common/error.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "common/error.tpl"; 10 | $this->layout = "common/layout"; 11 | 12 | $session = Registry::get('session'); 13 | 14 | $this->document->title = $this->data['text_error']; 15 | 16 | $this->data['errortitle'] = $this->data['text_error']; 17 | 18 | if($session->get("error")) { 19 | $this->data['errorstring'] = $session->get("error"); 20 | $session->set("error", ""); 21 | } 22 | else { 23 | $this->data['errorstring'] = "this is the errorstring"; 24 | } 25 | 26 | 27 | $this->render(); 28 | 29 | } 30 | 31 | 32 | } 33 | 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /webui/controller/common/footer.php: -------------------------------------------------------------------------------- 1 | id = "footer"; 9 | $this->template = "common/footer.tpl"; 10 | 11 | 12 | $this->render(); 13 | } 14 | 15 | 16 | } 17 | 18 | ?> 19 | -------------------------------------------------------------------------------- /webui/controller/common/layout-audit-removal.php: -------------------------------------------------------------------------------- 1 | data['title'] = $this->document->title; 9 | 10 | $this->template = "common/layout-audit-removal.tpl"; 11 | 12 | $this->data['search_args'] = ''; 13 | 14 | $this->data['open_saved_search_box'] = 0; 15 | 16 | 17 | $this->children = array( 18 | "common/menu", 19 | "search/folder", 20 | "common/footer" 21 | ); 22 | 23 | $this->render(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /webui/controller/common/layout-audit.php: -------------------------------------------------------------------------------- 1 | data['title'] = $this->document->title; 9 | 10 | $this->template = "common/layout-audit.tpl"; 11 | 12 | $this->data['search_args'] = ''; 13 | 14 | $this->data['open_saved_search_box'] = 0; 15 | 16 | 17 | $this->children = array( 18 | "common/menu", 19 | "search/folder", 20 | "common/footer" 21 | ); 22 | 23 | $this->render(); 24 | 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /webui/controller/common/layout-email.php: -------------------------------------------------------------------------------- 1 | data['title'] = $this->document->title; 8 | 9 | $this->template = "common/layout-email.tpl"; 10 | 11 | $this->render(); 12 | } 13 | 14 | 15 | } 16 | 17 | 18 | ?> 19 | -------------------------------------------------------------------------------- /webui/controller/common/layout-empty.php: -------------------------------------------------------------------------------- 1 | template = "common/layout-empty.tpl"; 8 | 9 | $this->render(); 10 | } 11 | 12 | 13 | } 14 | 15 | 16 | ?> 17 | -------------------------------------------------------------------------------- /webui/controller/common/layout-search.php: -------------------------------------------------------------------------------- 1 | data['title'] = $this->document->title; 8 | 9 | $this->template = "common/layout-search.tpl"; 10 | 11 | $this->data['search_args'] = ''; 12 | 13 | $this->data['open_saved_search_box'] = 0; 14 | 15 | $this->children = array( 16 | "common/menu", 17 | "search/folder", 18 | "common/footer" 19 | ); 20 | 21 | $this->render(); 22 | 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /webui/controller/common/layout.php: -------------------------------------------------------------------------------- 1 | data['title'] = $this->document->title; 9 | 10 | $this->template = "common/layout.tpl"; 11 | 12 | 13 | $this->children = array( 14 | "common/menu", 15 | "common/footer" 16 | ); 17 | 18 | $this->render(); 19 | 20 | } 21 | 22 | 23 | } 24 | 25 | 26 | ?> 27 | -------------------------------------------------------------------------------- /webui/controller/common/menu.php: -------------------------------------------------------------------------------- 1 | id = "menu"; 9 | $this->template = "common/menu.tpl"; 10 | 11 | $db = Registry::get('db'); 12 | $session = Registry::get('session'); 13 | 14 | $this->load->model('saas/customer'); 15 | 16 | $this->data['admin_user'] = Registry::get('admin_user'); 17 | $this->data['auditor_user'] = Registry::get('auditor_user'); 18 | $this->data['readonly_admin'] = Registry::get('readonly_admin'); 19 | 20 | $this->data['settings'] = $this->model_saas_customer->get_customer_settings_by_email(); 21 | 22 | $this->data['realname'] = $session->get('realname'); 23 | 24 | $this->render(); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /webui/controller/common/not_found.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "common/not_found.tpl"; 10 | $this->layout = "common/layout"; 11 | 12 | $this->document->title = $this->data['title_not_found']; 13 | 14 | 15 | $this->render(); 16 | 17 | } 18 | 19 | 20 | } 21 | 22 | 23 | ?> 24 | -------------------------------------------------------------------------------- /webui/controller/folder/copy.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "search/save.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | 17 | $this->load->model('folder/folder'); 18 | 19 | $this->model_folder_folder->copy_message_to_folder_by_id($this->request->post['folder_id'], $this->request->post['id']); 20 | 21 | 22 | //$this->render(); 23 | } 24 | 25 | } 26 | 27 | ?> 28 | -------------------------------------------------------------------------------- /webui/controller/folder/folder.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "user/list.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | $language = Registry::get('language'); 17 | 18 | $this->load->model('folder/folder'); 19 | 20 | 21 | $this->data['term'] = ''; 22 | 23 | if(!isset($this->request->get['term']) || strlen($this->request->get['term']) < 2) { die("no data"); } 24 | 25 | 26 | /* check if we are admin */ 27 | 28 | if(Registry::get('admin_user') == 1) { 29 | $results = $this->model_folder_folder->get_folders_by_string($this->request->get['term']); 30 | 31 | $i = 0; 32 | $s = '[ '; 33 | 34 | foreach($results as $result) { 35 | $i++; 36 | $s .= '{ "id": "' . $i . '", "value": "' . $result['name'] . '" },'; 37 | } 38 | 39 | $s = preg_replace("/,$/", "", $s) . " ]"; 40 | 41 | print $s; 42 | } 43 | } 44 | 45 | 46 | } 47 | 48 | ?> 49 | -------------------------------------------------------------------------------- /webui/controller/group/group.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "user/list.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | $language = Registry::get('language'); 17 | 18 | $this->load->model('group/group'); 19 | $this->load->model('user/auth'); 20 | 21 | 22 | $this->data['term'] = ''; 23 | 24 | if(!isset($this->request->get['term']) || strlen($this->request->get['term']) < 2) { die("no data"); } 25 | 26 | 27 | /* check if we are admin */ 28 | 29 | if(Registry::get('admin_user') == 1) { 30 | $results = $this->model_group_group->get_groups_by_string($this->request->get['term']); 31 | 32 | $i = 0; 33 | $s = '[ '; 34 | 35 | foreach($results as $result) { 36 | $i++; 37 | $s .= '{ "id": "' . $i . '", "value": "' . $result['groupname'] . '" },'; 38 | } 39 | 40 | $s = preg_replace("/,$/", "", $s) . " ]"; 41 | 42 | print $s; 43 | } 44 | } 45 | 46 | 47 | } 48 | 49 | ?> 50 | -------------------------------------------------------------------------------- /webui/controller/health/health.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "health/health.tpl"; 10 | if(EXTERNAL_DASHBOARD_URL) { 11 | $this->layout = "common/layout-empty"; 12 | } 13 | else { 14 | $this->layout = "common/layout"; 15 | } 16 | 17 | $this->load->model('health/health'); 18 | 19 | $request = Registry::get('request'); 20 | $language = Registry::get('language'); 21 | 22 | $this->document->title = $language->get('text_health_monitor'); 23 | 24 | 25 | /* check if we are admin */ 26 | 27 | if(Registry::get('admin_user') != 1 && Registry::get('readonly_admin') != 1) { 28 | $this->template = "common/error.tpl"; 29 | $this->data['errorstring'] = $this->data['text_you_are_not_admin']; 30 | } 31 | else { 32 | if(isset($_GET['toggle_enable_purge'])) { 33 | $this->model_health_health->toggle_option('enable_purge'); 34 | header('Location: ' . SITE_URL . HEALTH_URL); 35 | exit; 36 | } 37 | 38 | } 39 | 40 | 41 | $this->render(); 42 | } 43 | 44 | } 45 | 46 | ?> 47 | -------------------------------------------------------------------------------- /webui/controller/health/worker.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "health/worker.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | $db_history = Registry::get('db_history'); 14 | 15 | $this->load->model('health/health'); 16 | $this->load->model('stat/counter'); 17 | if(ENABLE_SAAS == 1) { 18 | $this->load->model('saas/customer'); 19 | } 20 | 21 | $request = Registry::get('request'); 22 | $lang = Registry::get('language'); 23 | 24 | $db = Registry::get('db'); 25 | $db->select_db($db->database); 26 | 27 | 28 | if(Registry::get('admin_user') != 1 && Registry::get('readonly_admin') != 1) { 29 | die("go away"); 30 | } 31 | 32 | $this->model_health_health->collect_data(); 33 | $this->data['health'] = $this->model_health_health->data; 34 | 35 | $this->render(); 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /webui/controller/ldap/test.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "ldap/list.tpl"; 11 | $this->layout = "common/layout"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | $lang = Registry::get('language'); 17 | 18 | $ldap = new LDAP($this->request->post['ldap_host'], $this->request->post['ldap_bind_dn'], $this->request->post['ldap_bind_pw']); 19 | 20 | if($ldap->is_bind_ok()) { 21 | print "" . $lang->data['text_connection_ok'] . " "; 22 | 23 | $query = $ldap->query($this->request->post['ldap_base_dn'], "(mail=*)", array()); 24 | if($query->num_rows < 1) { 25 | print "" . $lang->data['text_not_found_any_email_address'] . " "; 26 | } 27 | } 28 | else { 29 | print "" . $lang->data['text_connection_failed'] . " "; 30 | } 31 | 32 | } 33 | 34 | 35 | } 36 | 37 | ?> 38 | -------------------------------------------------------------------------------- /webui/controller/login/logout.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "login/logout.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | $request = Registry::get('request'); 14 | $session = Registry::get('session'); 15 | 16 | $this->load->model('user/auth'); 17 | 18 | $this->data['title'] = $this->data['text_logout']; 19 | $this->data['title_prefix'] = TITLE_PREFIX; 20 | 21 | if(ENABLE_SAAS == 1) { 22 | $this->load->model('saas/customer'); 23 | $this->model_saas_customer->offline($session->get('email')); 24 | } 25 | 26 | logout(); 27 | 28 | $this->render(); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /webui/controller/login/sso.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "login/login.tpl"; 11 | $this->layout = "common/layout"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $session = Registry::get('session'); 16 | 17 | $db = Registry::get('db'); 18 | 19 | $this->load->model('user/auth'); 20 | $this->load->model('user/user'); 21 | $this->load->model('user/prefs'); 22 | $this->load->model('folder/folder'); 23 | $this->load->model('domain/domain'); 24 | 25 | $this->document->title = $this->data['text_login']; 26 | 27 | if($this->model_user_auth->check_ntlm_auth() == 1) { 28 | header("Location: " . SITE_URL . "search.php"); 29 | } else { 30 | header("Location: " . SITE_URL . "login.php"); 31 | } 32 | 33 | exit; 34 | 35 | } 36 | 37 | } 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /webui/controller/message/bulkpdf.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "message/bulkrestore.tpl"; 10 | $this->layout = "common/layout-empty"; 11 | 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $imap_ok = 0; 16 | 17 | $this->load->model('search/search'); 18 | $this->load->model('search/message'); 19 | $this->load->model('message/pdf'); 20 | 21 | $this->load->model('user/user'); 22 | $this->load->model('mail/mail'); 23 | 24 | $this->load->helper('tcpdf/config/lang/hun'); 25 | $this->load->helper('tcpdf/tcpdf'); 26 | 27 | $this->document->title = $this->data['text_message']; 28 | 29 | if(!isset($this->request->post['idlist']) || $this->request->post['idlist'] == '') { die("no idlist parameter given"); } 30 | 31 | $idlist = $this->model_search_search->check_your_permission_by_id_list(explode(",", $this->request->post['idlist'])); 32 | 33 | $this->model_message_pdf->download_files_as_zip($idlist); 34 | } 35 | 36 | 37 | } 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /webui/controller/message/dl.php: -------------------------------------------------------------------------------- 1 | id = "content"; 9 | $this->template = "message/headers.tpl"; 10 | $this->layout = "common/layout-empty"; 11 | 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $this->load->model('search/search'); 16 | $this->load->model('search/message'); 17 | $this->load->model('message/restore'); 18 | 19 | $session = Registry::get('session'); 20 | $a = $session->get('last_search'); 21 | if($a) { 22 | $a = unserialize($a); 23 | } 24 | 25 | $idlist = $this->model_search_search->check_your_permission_by_id_list($a); 26 | print implode(",", $idlist); 27 | 28 | } 29 | 30 | 31 | } 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /webui/controller/message/folder.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "message/note.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | $session = Registry::get('session'); 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | $sphx = Registry::get('sphx'); 17 | 18 | $this->load->model('search/search'); 19 | $this->load->model('folder/folder'); 20 | 21 | if(isset($this->request->post['folder_id']) && isset($this->request->post['id'])) { 22 | 23 | if($this->model_search_search->check_your_permission_by_id($this->request->post['id']) == 1) { 24 | $this->model_folder_folder->update_message_folder($this->request->post['id'], $this->request->post['folder_id']); 25 | } 26 | } 27 | } 28 | 29 | } 30 | 31 | ?> 32 | -------------------------------------------------------------------------------- /webui/controller/message/note.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "message/note.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | $session = Registry::get('session'); 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | 17 | $this->load->model('search/search'); 18 | $this->load->model('search/message'); 19 | 20 | if(isset($this->request->post['note']) && isset($this->request->post['id'])) { 21 | 22 | if($this->model_search_search->check_your_permission_by_id($this->request->post['id']) == 1) { 23 | if(RT) { 24 | $this->model_search_message->add_message_rt_note($this->request->post['id'], $session->get("uid"), urldecode($this->request->post['note'])); 25 | } else { 26 | $this->model_search_message->add_message_note($this->request->post['id'], $session->get("uid"), urldecode($this->request->post['note'])); 27 | } 28 | } 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /webui/controller/policy/apply.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "policy/apply.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | 16 | $db = Registry::get('db'); 17 | $lang = Registry::get('language'); 18 | 19 | if(Registry::get('admin_user') == 0) { 20 | die("go away"); 21 | } 22 | 23 | system(RELOAD_COMMAND, $val); 24 | 25 | if($val !== 0) { 26 | print $lang->data['text_install_sudo_apply']; 27 | } 28 | 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /webui/controller/policy/updateretention.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "policy/updateretention.tpl"; 11 | $this->layout = "common/layout"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | 16 | $db = Registry::get('db'); 17 | 18 | $this->load->model('policy/retention'); 19 | 20 | $this->document->title = $this->data['text_retention_rules']; 21 | 22 | if(Registry::get('admin_user') == 0) { 23 | die("go away"); 24 | } 25 | 26 | $this->data['n'] = 0; 27 | $this->data['domain'] = ''; 28 | $this->data['days'] = 0; 29 | 30 | if(isset($this->request->get['domain']) && isset($this->request->get['days'])) { 31 | $this->data['domain'] = $this->request->get['domain']; 32 | $this->data['days'] = $this->request->get['days']; 33 | 34 | $this->data['n'] = $this->model_policy_retention->update_retention_time($this->data); 35 | } 36 | 37 | $this->render(); 38 | } 39 | 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /webui/controller/search/folder.php: -------------------------------------------------------------------------------- 1 | id = "folder"; 9 | $this->template = "search/folder.tpl"; 10 | 11 | $session = Registry::get('session'); 12 | $request = Registry::get('request'); 13 | $db = Registry::get('db'); 14 | 15 | $this->load->model('folder/folder'); 16 | 17 | $this->data['extra_folders'] = $this->model_folder_folder->get_folders_for_user(); 18 | array_unshift($this->data['extra_folders'], array('id' => 0, 'name' => '---')); 19 | 20 | $this->data['folders_by_hier'] = $this->model_folder_folder->get_all_folder_ids_hier($session->get("uid")); 21 | 22 | $this->render(); 23 | } 24 | 25 | 26 | } 27 | 28 | ?> 29 | -------------------------------------------------------------------------------- /webui/controller/search/load.php: -------------------------------------------------------------------------------- 1 | id = "content"; 11 | $this->template = "search/load.tpl"; 12 | $this->layout = "common/layout-empty"; 13 | 14 | 15 | $request = Registry::get('request'); 16 | $db = Registry::get('db'); 17 | 18 | $this->load->model('search/search'); 19 | $this->load->model('search/message'); 20 | $this->load->model('user/user'); 21 | 22 | $this->data['terms'] = $this->model_search_search->get_search_terms(); 23 | 24 | $this->render(); 25 | } 26 | 27 | } 28 | 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /webui/controller/search/remove.php: -------------------------------------------------------------------------------- 1 | id = "content"; 11 | $this->template = "search/load.tpl"; 12 | $this->layout = "common/layout-empty"; 13 | 14 | 15 | $request = Registry::get('request'); 16 | $db = Registry::get('db'); 17 | 18 | $this->load->model('search/search'); 19 | $this->load->model('search/message'); 20 | $this->load->model('user/user'); 21 | 22 | if(isset($this->request->get['ts'])) { 23 | $this->data['terms'] = $this->model_search_search->remove_search_term($this->request->get['ts']); 24 | } 25 | } 26 | 27 | } 28 | 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /webui/controller/search/save.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "search/save.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | 17 | $this->load->model('search/search'); 18 | 19 | if(isset($this->request->post['save'])) { 20 | $a = preg_replace("/\&save=1$/", "", http_build_query($this->request->post)); 21 | 22 | $this->model_search_search->add_search_term($a); 23 | } 24 | 25 | } 26 | 27 | } 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /webui/controller/search/tag.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "search/tag.tpl"; 11 | $this->layout = "common/layout-empty"; 12 | 13 | 14 | $session = Registry::get('session'); 15 | $request = Registry::get('request'); 16 | $db = Registry::get('db'); 17 | 18 | $this->load->model('search/search'); 19 | $this->load->model('search/message'); 20 | 21 | if(isset($this->request->post['tag']) && isset($this->request->post['idlist'])) { 22 | $idlist = explode(",", $this->request->post['idlist']); 23 | 24 | if(count($idlist) > 0) { 25 | 26 | $q = ''; 27 | 28 | $ids = $this->model_search_search->check_your_permission_by_id_list($idlist); 29 | 30 | for($i=0; $imodel_search_message->bulk_add_message_tag($ids, $session->get("uid"), urldecode($this->request->post['tag']), $q); 34 | } 35 | } 36 | } 37 | 38 | } 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /webui/controller/stat/online.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "stat/online.tpl"; 11 | $this->layout = "common/layout"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | 17 | $this->load->model('saas/customer'); 18 | 19 | $this->document->title = $this->data['text_statistics']; 20 | 21 | if(Registry::get('admin_user') == 0) { 22 | die("go away"); 23 | } 24 | 25 | $this->data['users'] = $this->model_saas_customer->get_online_users(); 26 | 27 | $this->render(); 28 | } 29 | 30 | 31 | } 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /webui/controller/stat/stat.php: -------------------------------------------------------------------------------- 1 | id = "content"; 10 | $this->template = "stat/stat.tpl"; 11 | $this->layout = "common/layout"; 12 | 13 | 14 | $request = Registry::get('request'); 15 | $db = Registry::get('db'); 16 | 17 | $this->load->model('user/user'); 18 | $this->load->model('stat/chart'); 19 | 20 | $this->document->title = $this->data['text_statistics']; 21 | 22 | $this->data['timespan'] = @$this->request->get['timespan']; 23 | $this->data['uid'] = @$this->request->get['uid']; 24 | 25 | $this->data['admin_user'] = Registry::get('admin_user'); 26 | $this->data['readonly_admin'] = Registry::get('readonly_admin'); 27 | 28 | $this->data['username'] = Registry::get('username'); 29 | 30 | $timespan = @$this->request->get['timespan']; 31 | 32 | $db->select_db($db->database); 33 | 34 | $chart = new ModelStatChart(); 35 | 36 | $this->data['data'] = $chart->lineChartArchivedMessages($timespan); 37 | 38 | 39 | $this->render(); 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /webui/google-api/auth/apiSigner.php: -------------------------------------------------------------------------------- 1 | 24 | */ 25 | abstract class apiSigner { 26 | /** 27 | * Signs data, returns the signature as binary data. 28 | */ 29 | abstract public function sign($data); 30 | } 31 | -------------------------------------------------------------------------------- /webui/google-api/auth/apiVerifier.php: -------------------------------------------------------------------------------- 1 | 24 | */ 25 | abstract class apiVerifier { 26 | /** 27 | * Checks a signature, returns true if the signature is correct, 28 | * false otherwise. 29 | */ 30 | abstract public function verify($data, $signature); 31 | } 32 | -------------------------------------------------------------------------------- /webui/images/.nofile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/images/.nofile -------------------------------------------------------------------------------- /webui/js.php: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /webui/log/.htaccess: -------------------------------------------------------------------------------- 1 | order deny,allow 2 | deny from all 3 | -------------------------------------------------------------------------------- /webui/log/lock: -------------------------------------------------------------------------------- 1 | lock file 2 | -------------------------------------------------------------------------------- /webui/model/audit/removal.php: -------------------------------------------------------------------------------- 1 | 0) { $limit = " LIMIT " . (int)$from . ", " . (int)$page_len; } 10 | 11 | $query = $this->db->query("SELECT * FROM " . TABLE_DELETED . " WHERE deleted=-1 ORDER BY date1 DESC $limit"); 12 | 13 | return $query->rows; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /webui/model/search/auto.php: -------------------------------------------------------------------------------- 1 | db->query("SELECT * FROM " . TABLE_AUTOSEARCH . " ORDER BY id ASC"); 11 | 12 | if(isset($query->rows)) { 13 | foreach($query->rows as $q) { 14 | 15 | $data[] = array('id' => $q['id'], 'query' => $q['query']); 16 | } 17 | } 18 | 19 | return $data; 20 | } 21 | 22 | 23 | public function add($data = array()) { 24 | if(!isset($data['query'])) { return 0; } 25 | 26 | $query = $this->db->query("INSERT INTO " . TABLE_AUTOSEARCH . " (query) VALUES (?)", array($data['query'])); 27 | $rc = $this->db->countAffected(); 28 | 29 | LOGGER("add new automated search query: " . $data['query'] . " (rc=$rc)"); 30 | 31 | return $rc; 32 | } 33 | 34 | 35 | public function remove($id = 0) { 36 | if($id == 0) { return 0; } 37 | 38 | $query = $this->db->query("DELETE FROM " . TABLE_AUTOSEARCH . " WHERE id=?", array($id)); 39 | 40 | $rc = $this->db->countAffected(); 41 | 42 | LOGGER("remove autosearch: $id (rc=$rc)"); 43 | 44 | return $rc; 45 | } 46 | 47 | 48 | } 49 | 50 | 51 | ?> 52 | -------------------------------------------------------------------------------- /webui/model/stat/counter.php: -------------------------------------------------------------------------------- 1 | db->query("SELECT * FROM " . TABLE_COUNTER); 10 | 11 | if($query->num_rows == 1) { 12 | $asize = $query->row['size']; 13 | $ssize = $query->row['stored_size']; 14 | 15 | unset($query->row['size']); 16 | unset($query->row['stored_size']); 17 | 18 | $counter = $query->row; 19 | } 20 | 21 | return array ($asize, $ssize, $counter); 22 | } 23 | 24 | 25 | } 26 | 27 | ?> 28 | -------------------------------------------------------------------------------- /webui/ok.txt: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /webui/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./tests 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /webui/qr.php: -------------------------------------------------------------------------------- 1 | model('user/prefs'); 14 | $loader->helper('phpqrcode/qrlib'); 15 | $loader->helper('PHPGangsta_GoogleAuthenticator'); 16 | 17 | $p = new ModelUserPrefs(); 18 | 19 | if(isset($_GET['refresh'])) { 20 | $GA = new PHPGangsta_GoogleAuthenticator(); 21 | 22 | $new_secret = $GA->createSecret(); 23 | 24 | $p->update_ga_secret($session->get('username'), $new_secret); 25 | 26 | print "$new_secret
\n"; 27 | 28 | exit; 29 | } 30 | else if(isset($_GET['toggle'])) { 31 | $p->toggle_ga($session->get('username'), $_GET['toggle']); 32 | } 33 | 34 | 35 | $ga = $p->get_ga_settings($session->get('username')); 36 | 37 | QRcode::png("otpauth://totp/" . SITE_NAME . "?secret=" . $ga['ga_secret'], false, "L", 4, 2); 38 | -------------------------------------------------------------------------------- /webui/securimage/AHGBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/AHGBold.ttf -------------------------------------------------------------------------------- /webui/securimage/README.FONT.txt: -------------------------------------------------------------------------------- 1 | AHGBold.ttf is used by Securimage under the following license: 2 | 3 | Alte Haas Grotesk is a typeface that look like an helvetica printed in an old Muller-Brockmann Book. 4 | 5 | These fonts are freeware and can be distributed as long as they are 6 | together with this text file. 7 | 8 | I would appreciate very much to see what you have done with it anyway. 9 | 10 | yann le coroller 11 | www.yannlecoroller.com 12 | yann@lecoroller.com -------------------------------------------------------------------------------- /webui/securimage/backgrounds/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/backgrounds/bg3.jpg -------------------------------------------------------------------------------- /webui/securimage/backgrounds/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/backgrounds/bg4.jpg -------------------------------------------------------------------------------- /webui/securimage/backgrounds/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/backgrounds/bg5.jpg -------------------------------------------------------------------------------- /webui/securimage/backgrounds/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/backgrounds/bg6.png -------------------------------------------------------------------------------- /webui/securimage/database/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /webui/securimage/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webui/securimage/database/securimage.sq3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/database/securimage.sq3 -------------------------------------------------------------------------------- /webui/securimage/images/audio_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/images/audio_icon.png -------------------------------------------------------------------------------- /webui/securimage/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/images/refresh.png -------------------------------------------------------------------------------- /webui/securimage/securimage_play.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/securimage/securimage_play.swf -------------------------------------------------------------------------------- /webui/sso.php: -------------------------------------------------------------------------------- 1 | dispatch($action, new Router('common/not_found')); 43 | -------------------------------------------------------------------------------- /webui/system/db.php: -------------------------------------------------------------------------------- 1 | driver = new $driver($hostname, $username, $password, $database, $prefix); 13 | $this->database = $database; 14 | } 15 | 16 | 17 | public function select_db($db) { 18 | $this->driver->select_db($db); 19 | } 20 | 21 | 22 | public function query($sql, $arr = array()) { 23 | return $this->driver->query($sql, $arr); 24 | } 25 | 26 | 27 | public function countAffected() { 28 | return $this->driver->countAffected(); 29 | } 30 | 31 | 32 | public function getLastId() { 33 | return $this->driver->getLastId(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /webui/system/document.php: -------------------------------------------------------------------------------- 1 | 8 | This directive turns on auto-paragraphing, where double newlines are 9 | converted in to paragraphs whenever possible. Auto-paragraphing: 10 |

11 |
    12 |
  • Always applies to inline elements or text in the root node,
  • 13 |
  • Applies to inline elements or text with double newlines in nodes 14 | that allow paragraph tags,
  • 15 |
  • Applies to double newlines in paragraph tags
  • 16 |
17 |

18 | p tags must be allowed for this directive to take effect. 19 | We do not use br tags for paragraphing, as that is 20 | semantically incorrect. 21 |

22 |

23 | To prevent auto-paragraphing as a content-producer, refrain from using 24 | double-newlines except to specify a new paragraph or in contexts where 25 | it has special meaning (whitespace usually has no meaning except in 26 | tags like pre, so this should not be difficult.) To prevent 27 | the paragraphing of inline text adjacent to block elements, wrap them 28 | in div tags (the behavior is slightly different outside of 29 | the root node.) 30 |

31 | --# vim: et sw=4 sts=4 32 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.Custom 2 | TYPE: list 3 | VERSION: 2.0.1 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 | 7 |

8 | This directive can be used to add custom auto-format injectors. 9 | Specify an array of injector names (class name minus the prefix) 10 | or concrete implementations. Injector class must exist. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.DisplayLinkURI 2 | TYPE: bool 3 | VERSION: 3.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | This directive turns on the in-text display of URIs in <a> tags, and disables 8 | those links. For example, example becomes 9 | example (http://example.com). 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.Linkify 2 | TYPE: bool 3 | VERSION: 2.0.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 |

8 | This directive turns on linkification, auto-linking http, ftp and 9 | https URLs. a tags with the href attribute 10 | must be allowed. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.PurifierLinkify.DocURL 2 | TYPE: string 3 | VERSION: 2.0.1 4 | DEFAULT: '#%s' 5 | ALIASES: AutoFormatParam.PurifierLinkifyDocURL 6 | --DESCRIPTION-- 7 |

8 | Location of configuration documentation to link to, let %s substitute 9 | into the configuration's namespace and directive names sans the percent 10 | sign. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.PurifierLinkify 2 | TYPE: bool 3 | VERSION: 2.0.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 |

8 | Internal auto-formatter that converts configuration directives in 9 | syntax %Namespace.Directive to links. a tags 10 | with the href attribute must be allowed. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.RemoveEmpty.Predicate 2 | TYPE: hash 3 | VERSION: 4.7.0 4 | DEFAULT: array('colgroup' => array(), 'th' => array(), 'td' => array(), 'iframe' => array('src')) 5 | --DESCRIPTION-- 6 |

7 | Given that an element has no contents, it will be removed by default, unless 8 | this predicate dictates otherwise. The predicate can either be an associative 9 | map from tag name to list of attributes that must be present for the element 10 | to be considered preserved: thus, the default always preserves colgroup, 11 | th and td, and also iframe if it 12 | has a src. 13 |

14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions 2 | TYPE: lookup 3 | VERSION: 4.0.0 4 | DEFAULT: array('td' => true, 'th' => true) 5 | --DESCRIPTION-- 6 |

7 | When %AutoFormat.RemoveEmpty and %AutoFormat.RemoveEmpty.RemoveNbsp 8 | are enabled, this directive defines what HTML elements should not be 9 | removede if they have only a non-breaking space in them. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.RemoveEmpty.RemoveNbsp 2 | TYPE: bool 3 | VERSION: 4.0.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | When enabled, HTML Purifier will treat any elements that contain only 8 | non-breaking spaces as well as regular whitespace as empty, and remove 9 | them when %AutoForamt.RemoveEmpty is enabled. 10 |

11 |

12 | See %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions for a list of elements 13 | that don't have this behavior applied to them. 14 |

15 | --# vim: et sw=4 sts=4 16 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt: -------------------------------------------------------------------------------- 1 | AutoFormat.RemoveSpansWithoutAttributes 2 | TYPE: bool 3 | VERSION: 4.0.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | This directive causes span tags without any attributes 8 | to be removed. It will also remove spans that had all attributes 9 | removed during processing. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt: -------------------------------------------------------------------------------- 1 | CSS.AllowDuplicates 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 4.8.0 5 | --DESCRIPTION-- 6 |

7 | By default, HTML Purifier removes duplicate CSS properties, 8 | like color:red; color:blue. If this is set to 9 | true, duplicate properties are allowed. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt: -------------------------------------------------------------------------------- 1 | CSS.AllowImportant 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 3.1.0 5 | --DESCRIPTION-- 6 | This parameter determines whether or not !important cascade modifiers should 7 | be allowed in user CSS. If false, !important will stripped. 8 | --# vim: et sw=4 sts=4 9 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt: -------------------------------------------------------------------------------- 1 | CSS.AllowTricky 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 3.1.0 5 | --DESCRIPTION-- 6 | This parameter determines whether or not to allow "tricky" CSS properties and 7 | values. Tricky CSS properties/values can drastically modify page layout or 8 | be used for deceptive practices but do not directly constitute a security risk. 9 | For example, display:none; is considered a tricky property that 10 | will only be allowed if this directive is set to true. 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt: -------------------------------------------------------------------------------- 1 | CSS.AllowedFonts 2 | TYPE: lookup/null 3 | VERSION: 4.3.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 |

7 | Allows you to manually specify a set of allowed fonts. If 8 | NULL, all fonts are allowed. This directive 9 | affects generic names (serif, sans-serif, monospace, cursive, 10 | fantasy) as well as specific font families. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt: -------------------------------------------------------------------------------- 1 | CSS.AllowedProperties 2 | TYPE: lookup/null 3 | VERSION: 3.1.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | If HTML Purifier's style attributes set is unsatisfactory for your needs, 9 | you can overload it with your own list of tags to allow. Note that this 10 | method is subtractive: it does its job by taking away from HTML Purifier 11 | usual feature set, so you cannot add an attribute that HTML Purifier never 12 | supported in the first place. 13 |

14 |

15 | Warning: If another directive conflicts with the 16 | elements here, that directive will win and override. 17 |

18 | --# vim: et sw=4 sts=4 19 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt: -------------------------------------------------------------------------------- 1 | CSS.DefinitionRev 2 | TYPE: int 3 | VERSION: 2.0.0 4 | DEFAULT: 1 5 | --DESCRIPTION-- 6 | 7 |

8 | Revision identifier for your custom definition. See 9 | %HTML.DefinitionRev for details. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt: -------------------------------------------------------------------------------- 1 | CSS.ForbiddenProperties 2 | TYPE: lookup 3 | VERSION: 4.2.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 |

7 | This is the logical inverse of %CSS.AllowedProperties, and it will 8 | override that directive or any other directive. If possible, 9 | %CSS.AllowedProperties is recommended over this directive, 10 | because it can sometimes be difficult to tell whether or not you've 11 | forbidden all of the CSS properties you truly would like to disallow. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt: -------------------------------------------------------------------------------- 1 | CSS.MaxImgLength 2 | TYPE: string/null 3 | DEFAULT: '1200px' 4 | VERSION: 3.1.1 5 | --DESCRIPTION-- 6 |

7 | This parameter sets the maximum allowed length on img tags, 8 | effectively the width and height properties. 9 | Only absolute units of measurement (in, pt, pc, mm, cm) and pixels (px) are allowed. This is 10 | in place to prevent imagecrash attacks, disable with null at your own risk. 11 | This directive is similar to %HTML.MaxImgLength, and both should be 12 | concurrently edited, although there are 13 | subtle differences in the input format (the CSS max is a number with 14 | a unit). 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt: -------------------------------------------------------------------------------- 1 | CSS.Proprietary 2 | TYPE: bool 3 | VERSION: 3.0.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 |

8 | Whether or not to allow safe, proprietary CSS values. 9 |

10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt: -------------------------------------------------------------------------------- 1 | CSS.Trusted 2 | TYPE: bool 3 | VERSION: 4.2.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | Indicates whether or not the user's CSS input is trusted or not. If the 7 | input is trusted, a more expansive set of allowed properties. See 8 | also %HTML.Trusted. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt: -------------------------------------------------------------------------------- 1 | Cache.DefinitionImpl 2 | TYPE: string/null 3 | VERSION: 2.0.0 4 | DEFAULT: 'Serializer' 5 | --DESCRIPTION-- 6 | 7 | This directive defines which method to use when caching definitions, 8 | the complex data-type that makes HTML Purifier tick. Set to null 9 | to disable caching (not recommended, as you will see a definite 10 | performance degradation). 11 | 12 | --ALIASES-- 13 | Core.DefinitionCache 14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt: -------------------------------------------------------------------------------- 1 | Cache.SerializerPath 2 | TYPE: string/null 3 | VERSION: 2.0.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | Absolute path with no trailing slash to store serialized definitions in. 9 | Default is within the 10 | HTML Purifier library inside DefinitionCache/Serializer. This 11 | path must be writable by the webserver. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt: -------------------------------------------------------------------------------- 1 | Cache.SerializerPermissions 2 | TYPE: int/null 3 | VERSION: 4.3.0 4 | DEFAULT: 0755 5 | --DESCRIPTION-- 6 | 7 |

8 | Directory permissions of the files and directories created inside 9 | the DefinitionCache/Serializer or other custom serializer path. 10 |

11 |

12 | In HTML Purifier 4.8.0, this also supports NULL, 13 | which means that no chmod'ing or directory creation shall 14 | occur. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt: -------------------------------------------------------------------------------- 1 | Core.AggressivelyFixLt 2 | TYPE: bool 3 | VERSION: 2.1.0 4 | DEFAULT: true 5 | --DESCRIPTION-- 6 |

7 | This directive enables aggressive pre-filter fixes HTML Purifier can 8 | perform in order to ensure that open angled-brackets do not get killed 9 | during parsing stage. Enabling this will result in two preg_replace_callback 10 | calls and at least two preg_replace calls for every HTML document parsed; 11 | if your users make very well-formed HTML, you can set this directive false. 12 | This has no effect when DirectLex is used. 13 |

14 |

15 | Notice: This directive's default turned from false to true 16 | in HTML Purifier 3.2.0. 17 |

18 | --# vim: et sw=4 sts=4 19 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt: -------------------------------------------------------------------------------- 1 | Core.AllowHostnameUnderscore 2 | TYPE: bool 3 | VERSION: 4.6.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | By RFC 1123, underscores are not permitted in host names. 8 | (This is in contrast to the specification for DNS, RFC 9 | 2181, which allows underscores.) 10 | However, most browsers do the right thing when faced with 11 | an underscore in the host name, and so some poorly written 12 | websites are written with the expectation this should work. 13 | Setting this parameter to true relaxes our allowed character 14 | check so that underscores are permitted. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt: -------------------------------------------------------------------------------- 1 | Core.CollectErrors 2 | TYPE: bool 3 | VERSION: 2.0.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 | Whether or not to collect errors found while filtering the document. This 8 | is a useful way to give feedback to your users. Warning: 9 | Currently this feature is very patchy and experimental, with lots of 10 | possible error messages not yet implemented. It will not cause any 11 | problems, but it may not help your users either. 12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt: -------------------------------------------------------------------------------- 1 | Core.ColorKeywords 2 | TYPE: hash 3 | VERSION: 2.0.0 4 | --DEFAULT-- 5 | array ( 6 | 'maroon' => '#800000', 7 | 'red' => '#FF0000', 8 | 'orange' => '#FFA500', 9 | 'yellow' => '#FFFF00', 10 | 'olive' => '#808000', 11 | 'purple' => '#800080', 12 | 'fuchsia' => '#FF00FF', 13 | 'white' => '#FFFFFF', 14 | 'lime' => '#00FF00', 15 | 'green' => '#008000', 16 | 'navy' => '#000080', 17 | 'blue' => '#0000FF', 18 | 'aqua' => '#00FFFF', 19 | 'teal' => '#008080', 20 | 'black' => '#000000', 21 | 'silver' => '#C0C0C0', 22 | 'gray' => '#808080', 23 | ) 24 | --DESCRIPTION-- 25 | 26 | Lookup array of color names to six digit hexadecimal number corresponding 27 | to color, with preceding hash mark. Used when parsing colors. The lookup 28 | is done in a case-insensitive manner. 29 | --# vim: et sw=4 sts=4 30 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt: -------------------------------------------------------------------------------- 1 | Core.ConvertDocumentToFragment 2 | TYPE: bool 3 | DEFAULT: true 4 | --DESCRIPTION-- 5 | 6 | This parameter determines whether or not the filter should convert 7 | input that is a full document with html and body tags to a fragment 8 | of just the contents of a body tag. This parameter is simply something 9 | HTML Purifier can do during an edge-case: for most inputs, this 10 | processing is not necessary. 11 | 12 | --ALIASES-- 13 | Core.AcceptFullDocuments 14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt: -------------------------------------------------------------------------------- 1 | Core.DirectLexLineNumberSyncInterval 2 | TYPE: int 3 | VERSION: 2.0.0 4 | DEFAULT: 0 5 | --DESCRIPTION-- 6 | 7 |

8 | Specifies the number of tokens the DirectLex line number tracking 9 | implementations should process before attempting to resyncronize the 10 | current line count by manually counting all previous new-lines. When 11 | at 0, this functionality is disabled. Lower values will decrease 12 | performance, and this is only strictly necessary if the counting 13 | algorithm is buggy (in which case you should report it as a bug). 14 | This has no effect when %Core.MaintainLineNumbers is disabled or DirectLex is 15 | not being used. 16 |

17 | --# vim: et sw=4 sts=4 18 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt: -------------------------------------------------------------------------------- 1 | Core.DisableExcludes 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 4.5.0 5 | --DESCRIPTION-- 6 |

7 | This directive disables SGML-style exclusions, e.g. the exclusion of 8 | <object> in any descendant of a 9 | <pre> tag. Disabling excludes will allow some 10 | invalid documents to pass through HTML Purifier, but HTML Purifier 11 | will also be less likely to accidentally remove large documents during 12 | processing. 13 |

14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt: -------------------------------------------------------------------------------- 1 | Core.EnableIDNA 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 4.4.0 5 | --DESCRIPTION-- 6 | Allows international domain names in URLs. This configuration option 7 | requires the PEAR Net_IDNA2 module to be installed. It operates by 8 | punycoding any internationalized host names for maximum portability. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt: -------------------------------------------------------------------------------- 1 | Core.Encoding 2 | TYPE: istring 3 | DEFAULT: 'utf-8' 4 | --DESCRIPTION-- 5 | If for some reason you are unable to convert all webpages to UTF-8, you can 6 | use this directive as a stop-gap compatibility change to let HTML Purifier 7 | deal with non UTF-8 input. This technique has notable deficiencies: 8 | absolutely no characters outside of the selected character encoding will be 9 | preserved, not even the ones that have been ampersand escaped (this is due 10 | to a UTF-8 specific feature that automatically resolves all 11 | entities), making it pretty useless for anything except the most I18N-blind 12 | applications, although %Core.EscapeNonASCIICharacters offers fixes this 13 | trouble with another tradeoff. This directive only accepts ISO-8859-1 if 14 | iconv is not enabled. 15 | --# vim: et sw=4 sts=4 16 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt: -------------------------------------------------------------------------------- 1 | Core.EscapeInvalidChildren 2 | TYPE: bool 3 | DEFAULT: false 4 | --DESCRIPTION-- 5 |

Warning: this configuration option is no longer does anything as of 4.6.0.

6 | 7 |

When true, a child is found that is not allowed in the context of the 8 | parent element will be transformed into text as if it were ASCII. When 9 | false, that element and all internal tags will be dropped, though text will 10 | be preserved. There is no option for dropping the element but preserving 11 | child nodes.

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt: -------------------------------------------------------------------------------- 1 | Core.EscapeInvalidTags 2 | TYPE: bool 3 | DEFAULT: false 4 | --DESCRIPTION-- 5 | When true, invalid tags will be written back to the document as plain text. 6 | Otherwise, they are silently dropped. 7 | --# vim: et sw=4 sts=4 8 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt: -------------------------------------------------------------------------------- 1 | Core.EscapeNonASCIICharacters 2 | TYPE: bool 3 | VERSION: 1.4.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | This directive overcomes a deficiency in %Core.Encoding by blindly 7 | converting all non-ASCII characters into decimal numeric entities before 8 | converting it to its native encoding. This means that even characters that 9 | can be expressed in the non-UTF-8 encoding will be entity-ized, which can 10 | be a real downer for encodings like Big5. It also assumes that the ASCII 11 | repetoire is available, although this is the case for almost all encodings. 12 | Anyway, use UTF-8! 13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt: -------------------------------------------------------------------------------- 1 | Core.HiddenElements 2 | TYPE: lookup 3 | --DEFAULT-- 4 | array ( 5 | 'script' => true, 6 | 'style' => true, 7 | ) 8 | --DESCRIPTION-- 9 | 10 |

11 | This directive is a lookup array of elements which should have their 12 | contents removed when they are not allowed by the HTML definition. 13 | For example, the contents of a script tag are not 14 | normally shown in a document, so if script tags are to be removed, 15 | their contents should be removed to. This is opposed to a b 16 | tag, which defines some presentational changes but does not hide its 17 | contents. 18 |

19 | --# vim: et sw=4 sts=4 20 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.Language.txt: -------------------------------------------------------------------------------- 1 | Core.Language 2 | TYPE: string 3 | VERSION: 2.0.0 4 | DEFAULT: 'en' 5 | --DESCRIPTION-- 6 | 7 | ISO 639 language code for localizable things in HTML Purifier to use, 8 | which is mainly error reporting. There is currently only an English (en) 9 | translation, so this directive is currently useless. 10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt: -------------------------------------------------------------------------------- 1 | Core.LexerImpl 2 | TYPE: mixed/null 3 | VERSION: 2.0.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | This parameter determines what lexer implementation can be used. The 9 | valid values are: 10 |

11 |
12 |
null
13 |
14 | Recommended, the lexer implementation will be auto-detected based on 15 | your PHP-version and configuration. 16 |
17 |
string lexer identifier
18 |
19 | This is a slim way of manually overridding the implementation. 20 | Currently recognized values are: DOMLex (the default PHP5 21 | implementation) 22 | and DirectLex (the default PHP4 implementation). Only use this if 23 | you know what you are doing: usually, the auto-detection will 24 | manage things for cases you aren't even aware of. 25 |
26 |
object lexer instance
27 |
28 | Super-advanced: you can specify your own, custom, implementation that 29 | implements the interface defined by HTMLPurifier_Lexer. 30 | I may remove this option simply because I don't expect anyone 31 | to use it. 32 |
33 |
34 | --# vim: et sw=4 sts=4 35 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt: -------------------------------------------------------------------------------- 1 | Core.MaintainLineNumbers 2 | TYPE: bool/null 3 | VERSION: 2.0.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | If true, HTML Purifier will add line number information to all tokens. 9 | This is useful when error reporting is turned on, but can result in 10 | significant performance degradation and should not be used when 11 | unnecessary. This directive must be used with the DirectLex lexer, 12 | as the DOMLex lexer does not (yet) support this functionality. 13 | If the value is null, an appropriate value will be selected based 14 | on other configuration. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt: -------------------------------------------------------------------------------- 1 | Core.NormalizeNewlines 2 | TYPE: bool 3 | VERSION: 4.2.0 4 | DEFAULT: true 5 | --DESCRIPTION-- 6 |

7 | Whether or not to normalize newlines to the operating 8 | system default. When false, HTML Purifier 9 | will attempt to preserve mixed newline files. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt: -------------------------------------------------------------------------------- 1 | Core.RemoveInvalidImg 2 | TYPE: bool 3 | DEFAULT: true 4 | VERSION: 1.3.0 5 | --DESCRIPTION-- 6 | 7 |

8 | This directive enables pre-emptive URI checking in img 9 | tags, as the attribute validation strategy is not authorized to 10 | remove elements from the document. Revert to pre-1.3.0 behavior by setting to false. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt: -------------------------------------------------------------------------------- 1 | Core.RemoveProcessingInstructions 2 | TYPE: bool 3 | VERSION: 4.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | Instead of escaping processing instructions in the form <? ... 7 | ?>, remove it out-right. This may be useful if the HTML 8 | you are validating contains XML processing instruction gunk, however, 9 | it can also be user-unfriendly for people attempting to post PHP 10 | snippets. 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt: -------------------------------------------------------------------------------- 1 | Core.RemoveScriptContents 2 | TYPE: bool/null 3 | DEFAULT: NULL 4 | VERSION: 2.0.0 5 | DEPRECATED-VERSION: 2.1.0 6 | DEPRECATED-USE: Core.HiddenElements 7 | --DESCRIPTION-- 8 |

9 | This directive enables HTML Purifier to remove not only script tags 10 | but all of their contents. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt: -------------------------------------------------------------------------------- 1 | Filter.Custom 2 | TYPE: list 3 | VERSION: 3.1.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 |

7 | This directive can be used to add custom filters; it is nearly the 8 | equivalent of the now deprecated HTMLPurifier->addFilter() 9 | method. Specify an array of concrete implementations. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt: -------------------------------------------------------------------------------- 1 | Filter.ExtractStyleBlocks.Escaping 2 | TYPE: bool 3 | VERSION: 3.0.0 4 | DEFAULT: true 5 | ALIASES: Filter.ExtractStyleBlocksEscaping, FilterParam.ExtractStyleBlocksEscaping 6 | --DESCRIPTION-- 7 | 8 |

9 | Whether or not to escape the dangerous characters <, > and & 10 | as \3C, \3E and \26, respectively. This is can be safely set to false 11 | if the contents of StyleBlocks will be placed in an external stylesheet, 12 | where there is no risk of it being interpreted as HTML. 13 |

14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt: -------------------------------------------------------------------------------- 1 | Filter.ExtractStyleBlocks.TidyImpl 2 | TYPE: mixed/null 3 | VERSION: 3.1.0 4 | DEFAULT: NULL 5 | ALIASES: FilterParam.ExtractStyleBlocksTidyImpl 6 | --DESCRIPTION-- 7 |

8 | If left NULL, HTML Purifier will attempt to instantiate a csstidy 9 | class to use for internal cleaning. This will usually be good enough. 10 |

11 |

12 | However, for trusted user input, you can set this to false to 13 | disable cleaning. In addition, you can supply your own concrete implementation 14 | of Tidy's interface to use, although I don't know why you'd want to do that. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt: -------------------------------------------------------------------------------- 1 | Filter.YouTube 2 | TYPE: bool 3 | VERSION: 3.1.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Warning: Deprecated in favor of %HTML.SafeObject and 8 | %Output.FlashCompat (turn both on to allow YouTube videos and other 9 | Flash content). 10 |

11 |

12 | This directive enables YouTube video embedding in HTML Purifier. Check 13 | this document 14 | on embedding videos for more information on what this filter does. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt: -------------------------------------------------------------------------------- 1 | HTML.Allowed 2 | TYPE: itext/null 3 | VERSION: 2.0.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | This is a preferred convenience directive that combines 9 | %HTML.AllowedElements and %HTML.AllowedAttributes. 10 | Specify elements and attributes that are allowed using: 11 | element1[attr1|attr2],element2.... For example, 12 | if you would like to only allow paragraphs and links, specify 13 | a[href],p. You can specify attributes that apply 14 | to all elements using an asterisk, e.g. *[lang]. 15 | You can also use newlines instead of commas to separate elements. 16 |

17 |

18 | Warning: 19 | All of the constraints on the component directives are still enforced. 20 | The syntax is a subset of TinyMCE's valid_elements 21 | whitelist: directly copy-pasting it here will probably result in 22 | broken whitelists. If %HTML.AllowedElements or %HTML.AllowedAttributes 23 | are set, this directive has no effect. 24 |

25 | --# vim: et sw=4 sts=4 26 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt: -------------------------------------------------------------------------------- 1 | HTML.AllowedAttributes 2 | TYPE: lookup/null 3 | VERSION: 1.3.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | If HTML Purifier's attribute set is unsatisfactory, overload it! 9 | The syntax is "tag.attr" or "*.attr" for the global attributes 10 | (style, id, class, dir, lang, xml:lang). 11 |

12 |

13 | Warning: If another directive conflicts with the 14 | elements here, that directive will win and override. For 15 | example, %HTML.EnableAttrID will take precedence over *.id in this 16 | directive. You must set that directive to true before you can use 17 | IDs at all. 18 |

19 | --# vim: et sw=4 sts=4 20 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt: -------------------------------------------------------------------------------- 1 | HTML.AllowedComments 2 | TYPE: lookup 3 | VERSION: 4.4.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 | A whitelist which indicates what explicit comment bodies should be 7 | allowed, modulo leading and trailing whitespace. See also %HTML.AllowedCommentsRegexp 8 | (these directives are union'ed together, so a comment is considered 9 | valid if any directive deems it valid.) 10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt: -------------------------------------------------------------------------------- 1 | HTML.AllowedCommentsRegexp 2 | TYPE: string/null 3 | VERSION: 4.4.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | A regexp, which if it matches the body of a comment, indicates that 7 | it should be allowed. Trailing and leading spaces are removed prior 8 | to running this regular expression. 9 | Warning: Make sure you specify 10 | correct anchor metacharacters ^regex$, otherwise you may accept 11 | comments that you did not mean to! In particular, the regex /foo|bar/ 12 | is probably not sufficiently strict, since it also allows foobar. 13 | See also %HTML.AllowedComments (these directives are union'ed together, 14 | so a comment is considered valid if any directive deems it valid.) 15 | --# vim: et sw=4 sts=4 16 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt: -------------------------------------------------------------------------------- 1 | HTML.AllowedElements 2 | TYPE: lookup/null 3 | VERSION: 1.3.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 |

7 | If HTML Purifier's tag set is unsatisfactory for your needs, you can 8 | overload it with your own list of tags to allow. If you change 9 | this, you probably also want to change %HTML.AllowedAttributes; see 10 | also %HTML.Allowed which lets you set allowed elements and 11 | attributes at the same time. 12 |

13 |

14 | If you attempt to allow an element that HTML Purifier does not know 15 | about, HTML Purifier will raise an error. You will need to manually 16 | tell HTML Purifier about this element by using the 17 | advanced customization features. 18 |

19 |

20 | Warning: If another directive conflicts with the 21 | elements here, that directive will win and override. 22 |

23 | --# vim: et sw=4 sts=4 24 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt: -------------------------------------------------------------------------------- 1 | HTML.AllowedModules 2 | TYPE: lookup/null 3 | VERSION: 2.0.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | A doctype comes with a set of usual modules to use. Without having 9 | to mucking about with the doctypes, you can quickly activate or 10 | disable these modules by specifying which modules you wish to allow 11 | with this directive. This is most useful for unit testing specific 12 | modules, although end users may find it useful for their own ends. 13 |

14 |

15 | If you specify a module that does not exist, the manager will silently 16 | fail to use it, so be careful! User-defined modules are not affected 17 | by this directive. Modules defined in %HTML.CoreModules are not 18 | affected by this directive. 19 |

20 | --# vim: et sw=4 sts=4 21 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt: -------------------------------------------------------------------------------- 1 | HTML.Attr.Name.UseCDATA 2 | TYPE: bool 3 | DEFAULT: false 4 | VERSION: 4.0.0 5 | --DESCRIPTION-- 6 | The W3C specification DTD defines the name attribute to be CDATA, not ID, due 7 | to limitations of DTD. In certain documents, this relaxed behavior is desired, 8 | whether it is to specify duplicate names, or to specify names that would be 9 | illegal IDs (for example, names that begin with a digit.) Set this configuration 10 | directive to true to use the relaxed parsing rules. 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt: -------------------------------------------------------------------------------- 1 | HTML.BlockWrapper 2 | TYPE: string 3 | VERSION: 1.3.0 4 | DEFAULT: 'p' 5 | --DESCRIPTION-- 6 | 7 |

8 | String name of element to wrap inline elements that are inside a block 9 | context. This only occurs in the children of blockquote in strict mode. 10 |

11 |

12 | Example: by default value, 13 | <blockquote>Foo</blockquote> would become 14 | <blockquote><p>Foo</p></blockquote>. 15 | The <p> tags can be replaced with whatever you desire, 16 | as long as it is a block level element. 17 |

18 | --# vim: et sw=4 sts=4 19 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt: -------------------------------------------------------------------------------- 1 | HTML.CoreModules 2 | TYPE: lookup 3 | VERSION: 2.0.0 4 | --DEFAULT-- 5 | array ( 6 | 'Structure' => true, 7 | 'Text' => true, 8 | 'Hypertext' => true, 9 | 'List' => true, 10 | 'NonXMLCommonAttributes' => true, 11 | 'XMLCommonAttributes' => true, 12 | 'CommonAttributes' => true, 13 | ) 14 | --DESCRIPTION-- 15 | 16 |

17 | Certain modularized doctypes (XHTML, namely), have certain modules 18 | that must be included for the doctype to be an conforming document 19 | type: put those modules here. By default, XHTML's core modules 20 | are used. You can set this to a blank array to disable core module 21 | protection, but this is not recommended. 22 |

23 | --# vim: et sw=4 sts=4 24 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt: -------------------------------------------------------------------------------- 1 | HTML.CustomDoctype 2 | TYPE: string/null 3 | VERSION: 2.0.1 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 | A custom doctype for power-users who defined their own document 8 | type. This directive only applies when %HTML.Doctype is blank. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt: -------------------------------------------------------------------------------- 1 | HTML.DefinitionRev 2 | TYPE: int 3 | VERSION: 2.0.0 4 | DEFAULT: 1 5 | --DESCRIPTION-- 6 | 7 |

8 | Revision identifier for your custom definition specified in 9 | %HTML.DefinitionID. This serves the same purpose: uniquely identifying 10 | your custom definition, but this one does so in a chronological 11 | context: revision 3 is more up-to-date then revision 2. Thus, when 12 | this gets incremented, the cache handling is smart enough to clean 13 | up any older revisions of your definition as well as flush the 14 | cache. 15 |

16 | --# vim: et sw=4 sts=4 17 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt: -------------------------------------------------------------------------------- 1 | HTML.Doctype 2 | TYPE: string/null 3 | DEFAULT: NULL 4 | --DESCRIPTION-- 5 | Doctype to use during filtering. Technically speaking this is not actually 6 | a doctype (as it does not identify a corresponding DTD), but we are using 7 | this name for sake of simplicity. When non-blank, this will override any 8 | older directives like %HTML.XHTML or %HTML.Strict. 9 | --ALLOWED-- 10 | 'HTML 4.01 Transitional', 'HTML 4.01 Strict', 'XHTML 1.0 Transitional', 'XHTML 1.0 Strict', 'XHTML 1.1' 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt: -------------------------------------------------------------------------------- 1 | HTML.FlashAllowFullScreen 2 | TYPE: bool 3 | VERSION: 4.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Whether or not to permit embedded Flash content from 8 | %HTML.SafeObject to expand to the full screen. Corresponds to 9 | the allowFullScreen parameter. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt: -------------------------------------------------------------------------------- 1 | HTML.ForbiddenAttributes 2 | TYPE: lookup 3 | VERSION: 3.1.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 |

7 | While this directive is similar to %HTML.AllowedAttributes, for 8 | forwards-compatibility with XML, this attribute has a different syntax. Instead of 9 | tag.attr, use tag@attr. To disallow href 10 | attributes in a tags, set this directive to 11 | a@href. You can also disallow an attribute globally with 12 | attr or *@attr (either syntax is fine; the latter 13 | is provided for consistency with %HTML.AllowedAttributes). 14 |

15 |

16 | Warning: This directive complements %HTML.ForbiddenElements, 17 | accordingly, check 18 | out that directive for a discussion of why you 19 | should think twice before using this directive. 20 |

21 | --# vim: et sw=4 sts=4 22 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt: -------------------------------------------------------------------------------- 1 | HTML.ForbiddenElements 2 | TYPE: lookup 3 | VERSION: 3.1.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 |

7 | This was, perhaps, the most requested feature ever in HTML 8 | Purifier. Please don't abuse it! This is the logical inverse of 9 | %HTML.AllowedElements, and it will override that directive, or any 10 | other directive. 11 |

12 |

13 | If possible, %HTML.Allowed is recommended over this directive, because it 14 | can sometimes be difficult to tell whether or not you've forbidden all of 15 | the behavior you would like to disallow. If you forbid img 16 | with the expectation of preventing images on your site, you'll be in for 17 | a nasty surprise when people start using the background-image 18 | CSS property. 19 |

20 | --# vim: et sw=4 sts=4 21 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt: -------------------------------------------------------------------------------- 1 | HTML.MaxImgLength 2 | TYPE: int/null 3 | DEFAULT: 1200 4 | VERSION: 3.1.1 5 | --DESCRIPTION-- 6 |

7 | This directive controls the maximum number of pixels in the width and 8 | height attributes in img tags. This is 9 | in place to prevent imagecrash attacks, disable with null at your own risk. 10 | This directive is similar to %CSS.MaxImgLength, and both should be 11 | concurrently edited, although there are 12 | subtle differences in the input format (the HTML max is an integer). 13 |

14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt: -------------------------------------------------------------------------------- 1 | HTML.Nofollow 2 | TYPE: bool 3 | VERSION: 4.3.0 4 | DEFAULT: FALSE 5 | --DESCRIPTION-- 6 | If enabled, nofollow rel attributes are added to all outgoing links. 7 | --# vim: et sw=4 sts=4 8 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt: -------------------------------------------------------------------------------- 1 | HTML.Parent 2 | TYPE: string 3 | VERSION: 1.3.0 4 | DEFAULT: 'div' 5 | --DESCRIPTION-- 6 | 7 |

8 | String name of element that HTML fragment passed to library will be 9 | inserted in. An interesting variation would be using span as the 10 | parent element, meaning that only inline tags would be allowed. 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt: -------------------------------------------------------------------------------- 1 | HTML.Proprietary 2 | TYPE: bool 3 | VERSION: 3.1.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Whether or not to allow proprietary elements and attributes in your 8 | documents, as per HTMLPurifier_HTMLModule_Proprietary. 9 | Warning: This can cause your documents to stop 10 | validating! 11 |

12 | --# vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt: -------------------------------------------------------------------------------- 1 | HTML.SafeEmbed 2 | TYPE: bool 3 | VERSION: 3.1.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Whether or not to permit embed tags in documents, with a number of extra 8 | security features added to prevent script execution. This is similar to 9 | what websites like MySpace do to embed tags. Embed is a proprietary 10 | element and will cause your website to stop validating; you should 11 | see if you can use %Output.FlashCompat with %HTML.SafeObject instead 12 | first.

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt: -------------------------------------------------------------------------------- 1 | HTML.SafeIframe 2 | TYPE: bool 3 | VERSION: 4.4.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Whether or not to permit iframe tags in untrusted documents. This 8 | directive must be accompanied by a whitelist of permitted iframes, 9 | such as %URI.SafeIframeRegexp, otherwise it will fatally error. 10 | This directive has no effect on strict doctypes, as iframes are not 11 | valid. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt: -------------------------------------------------------------------------------- 1 | HTML.SafeObject 2 | TYPE: bool 3 | VERSION: 3.1.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Whether or not to permit object tags in documents, with a number of extra 8 | security features added to prevent script execution. This is similar to 9 | what websites like MySpace do to object tags. You should also enable 10 | %Output.FlashCompat in order to generate Internet Explorer 11 | compatibility code for your object tags. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt: -------------------------------------------------------------------------------- 1 | HTML.SafeScripting 2 | TYPE: lookup 3 | VERSION: 4.5.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 |

7 | Whether or not to permit script tags to external scripts in documents. 8 | Inline scripting is not allowed, and the script must match an explicit whitelist. 9 |

10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt: -------------------------------------------------------------------------------- 1 | HTML.Strict 2 | TYPE: bool 3 | VERSION: 1.3.0 4 | DEFAULT: false 5 | DEPRECATED-VERSION: 1.7.0 6 | DEPRECATED-USE: HTML.Doctype 7 | --DESCRIPTION-- 8 | Determines whether or not to use Transitional (loose) or Strict rulesets. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt: -------------------------------------------------------------------------------- 1 | HTML.TargetBlank 2 | TYPE: bool 3 | VERSION: 4.4.0 4 | DEFAULT: FALSE 5 | --DESCRIPTION-- 6 | If enabled, target=blank attributes are added to all outgoing links. 7 | (This includes links from an HTTPS version of a page to an HTTP version.) 8 | --# vim: et sw=4 sts=4 9 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt: -------------------------------------------------------------------------------- 1 | HTML.TargetNoreferrer 2 | TYPE: bool 3 | VERSION: 4.8.0 4 | DEFAULT: TRUE 5 | --DESCRIPTION-- 6 | If enabled, noreferrer rel attributes are added to links which have 7 | a target attribute associated with them. This prevents malicious 8 | destinations from overwriting the original window. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt: -------------------------------------------------------------------------------- 1 | HTML.TidyAdd 2 | TYPE: lookup 3 | VERSION: 2.0.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 | 7 | Fixes to add to the default set of Tidy fixes as per your level. 8 | --# vim: et sw=4 sts=4 9 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt: -------------------------------------------------------------------------------- 1 | HTML.TidyLevel 2 | TYPE: string 3 | VERSION: 2.0.0 4 | DEFAULT: 'medium' 5 | --DESCRIPTION-- 6 | 7 |

General level of cleanliness the Tidy module should enforce. 8 | There are four allowed values:

9 |
10 |
none
11 |
No extra tidying should be done
12 |
light
13 |
Only fix elements that would be discarded otherwise due to 14 | lack of support in doctype
15 |
medium
16 |
Enforce best practices
17 |
heavy
18 |
Transform all deprecated elements and attributes to standards 19 | compliant equivalents
20 |
21 | 22 | --ALLOWED-- 23 | 'none', 'light', 'medium', 'heavy' 24 | --# vim: et sw=4 sts=4 25 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt: -------------------------------------------------------------------------------- 1 | HTML.TidyRemove 2 | TYPE: lookup 3 | VERSION: 2.0.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 | 7 | Fixes to remove from the default set of Tidy fixes as per your level. 8 | --# vim: et sw=4 sts=4 9 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt: -------------------------------------------------------------------------------- 1 | HTML.Trusted 2 | TYPE: bool 3 | VERSION: 2.0.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | Indicates whether or not the user input is trusted or not. If the input is 7 | trusted, a more expansive set of allowed tags and attributes will be used. 8 | See also %CSS.Trusted. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt: -------------------------------------------------------------------------------- 1 | HTML.XHTML 2 | TYPE: bool 3 | DEFAULT: true 4 | VERSION: 1.1.0 5 | DEPRECATED-VERSION: 1.7.0 6 | DEPRECATED-USE: HTML.Doctype 7 | --DESCRIPTION-- 8 | Determines whether or not output is XHTML 1.0 or HTML 4.01 flavor. 9 | --ALIASES-- 10 | Core.XHTML 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt: -------------------------------------------------------------------------------- 1 | Output.CommentScriptContents 2 | TYPE: bool 3 | VERSION: 2.0.0 4 | DEFAULT: true 5 | --DESCRIPTION-- 6 | Determines whether or not HTML Purifier should attempt to fix up the 7 | contents of script tags for legacy browsers with comments. 8 | --ALIASES-- 9 | Core.CommentScriptContents 10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt: -------------------------------------------------------------------------------- 1 | Output.FixInnerHTML 2 | TYPE: bool 3 | VERSION: 4.3.0 4 | DEFAULT: true 5 | --DESCRIPTION-- 6 |

7 | If true, HTML Purifier will protect against Internet Explorer's 8 | mishandling of the innerHTML attribute by appending 9 | a space to any attribute that does not contain angled brackets, spaces 10 | or quotes, but contains a backtick. This slightly changes the 11 | semantics of any given attribute, so if this is unacceptable and 12 | you do not use innerHTML on any of your pages, you can 13 | turn this directive off. 14 |

15 | --# vim: et sw=4 sts=4 16 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt: -------------------------------------------------------------------------------- 1 | Output.FlashCompat 2 | TYPE: bool 3 | VERSION: 4.1.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | If true, HTML Purifier will generate Internet Explorer compatibility 8 | code for all object code. This is highly recommended if you enable 9 | %HTML.SafeObject. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt: -------------------------------------------------------------------------------- 1 | Output.Newline 2 | TYPE: string/null 3 | VERSION: 2.0.1 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | Newline string to format final output with. If left null, HTML Purifier 9 | will auto-detect the default newline type of the system and use that; 10 | you can manually override it here. Remember, \r\n is Windows, \r 11 | is Mac, and \n is Unix. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt: -------------------------------------------------------------------------------- 1 | Output.SortAttr 2 | TYPE: bool 3 | VERSION: 3.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | If true, HTML Purifier will sort attributes by name before writing them back 8 | to the document, converting a tag like: <el b="" a="" c="" /> 9 | to <el a="" b="" c="" />. This is a workaround for 10 | a bug in FCKeditor which causes it to swap attributes order, adding noise 11 | to text diffs. If you're not seeing this bug, chances are, you don't need 12 | this directive. 13 |

14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt: -------------------------------------------------------------------------------- 1 | Output.TidyFormat 2 | TYPE: bool 3 | VERSION: 1.1.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Determines whether or not to run Tidy on the final output for pretty 8 | formatting reasons, such as indentation and wrap. 9 |

10 |

11 | This can greatly improve readability for editors who are hand-editing 12 | the HTML, but is by no means necessary as HTML Purifier has already 13 | fixed all major errors the HTML may have had. Tidy is a non-default 14 | extension, and this directive will silently fail if Tidy is not 15 | available. 16 |

17 |

18 | If you are looking to make the overall look of your page's source 19 | better, I recommend running Tidy on the entire page rather than just 20 | user-content (after all, the indentation relative to the containing 21 | blocks will be incorrect). 22 |

23 | --ALIASES-- 24 | Core.TidyFormat 25 | --# vim: et sw=4 sts=4 26 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt: -------------------------------------------------------------------------------- 1 | Test.ForceNoIconv 2 | TYPE: bool 3 | DEFAULT: false 4 | --DESCRIPTION-- 5 | When set to true, HTMLPurifier_Encoder will act as if iconv does not exist 6 | and use only pure PHP implementations. 7 | --# vim: et sw=4 sts=4 8 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt: -------------------------------------------------------------------------------- 1 | URI.AllowedSchemes 2 | TYPE: lookup 3 | --DEFAULT-- 4 | array ( 5 | 'http' => true, 6 | 'https' => true, 7 | 'mailto' => true, 8 | 'ftp' => true, 9 | 'nntp' => true, 10 | 'news' => true, 11 | 'tel' => true, 12 | ) 13 | --DESCRIPTION-- 14 | Whitelist that defines the schemes that a URI is allowed to have. This 15 | prevents XSS attacks from using pseudo-schemes like javascript or mocha. 16 | There is also support for the data and file 17 | URI schemes, but they are not enabled by default. 18 | --# vim: et sw=4 sts=4 19 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.Base.txt: -------------------------------------------------------------------------------- 1 | URI.Base 2 | TYPE: string/null 3 | VERSION: 2.1.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | The base URI is the URI of the document this purified HTML will be 9 | inserted into. This information is important if HTML Purifier needs 10 | to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute 11 | is on. You may use a non-absolute URI for this value, but behavior 12 | may vary (%URI.MakeAbsolute deals nicely with both absolute and 13 | relative paths, but forwards-compatibility is not guaranteed). 14 | Warning: If set, the scheme on this URI 15 | overrides the one specified by %URI.DefaultScheme. 16 |

17 | --# vim: et sw=4 sts=4 18 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt: -------------------------------------------------------------------------------- 1 | URI.DefaultScheme 2 | TYPE: string 3 | DEFAULT: 'http' 4 | --DESCRIPTION-- 5 | 6 |

7 | Defines through what scheme the output will be served, in order to 8 | select the proper object validator when no scheme information is present. 9 |

10 | --# vim: et sw=4 sts=4 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt: -------------------------------------------------------------------------------- 1 | URI.DefinitionID 2 | TYPE: string/null 3 | VERSION: 2.1.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | Unique identifier for a custom-built URI definition. If you want 9 | to add custom URIFilters, you must specify this value. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt: -------------------------------------------------------------------------------- 1 | URI.DefinitionRev 2 | TYPE: int 3 | VERSION: 2.1.0 4 | DEFAULT: 1 5 | --DESCRIPTION-- 6 | 7 |

8 | Revision identifier for your custom definition. See 9 | %HTML.DefinitionRev for details. 10 |

11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt: -------------------------------------------------------------------------------- 1 | URI.Disable 2 | TYPE: bool 3 | VERSION: 1.3.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 |

8 | Disables all URIs in all forms. Not sure why you'd want to do that 9 | (after all, the Internet's founded on the notion of a hyperlink). 10 |

11 | 12 | --ALIASES-- 13 | Attr.DisableURI 14 | --# vim: et sw=4 sts=4 15 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt: -------------------------------------------------------------------------------- 1 | URI.DisableExternal 2 | TYPE: bool 3 | VERSION: 1.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | Disables links to external websites. This is a highly effective anti-spam 7 | and anti-pagerank-leech measure, but comes at a hefty price: nolinks or 8 | images outside of your domain will be allowed. Non-linkified URIs will 9 | still be preserved. If you want to be able to link to subdomains or use 10 | absolute URIs, specify %URI.Host for your website. 11 | --# vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt: -------------------------------------------------------------------------------- 1 | URI.DisableExternalResources 2 | TYPE: bool 3 | VERSION: 1.3.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | Disables the embedding of external resources, preventing users from 7 | embedding things like images from other hosts. This prevents access 8 | tracking (good for email viewers), bandwidth leeching, cross-site request 9 | forging, goatse.cx posting, and other nasties, but also results in a loss 10 | of end-user functionality (they can't directly post a pic they posted from 11 | Flickr anymore). Use it if you don't have a robust user-content moderation 12 | team. 13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt: -------------------------------------------------------------------------------- 1 | URI.DisableResources 2 | TYPE: bool 3 | VERSION: 4.2.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | Disables embedding resources, essentially meaning no pictures. You can 8 | still link to them though. See %URI.DisableExternalResources for why 9 | this might be a good idea. 10 |

11 |

12 | Note: While this directive has been available since 1.3.0, 13 | it didn't actually start doing anything until 4.2.0. 14 |

15 | --# vim: et sw=4 sts=4 16 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.Host.txt: -------------------------------------------------------------------------------- 1 | URI.Host 2 | TYPE: string/null 3 | VERSION: 1.2.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 | 7 |

8 | Defines the domain name of the server, so we can determine whether or 9 | an absolute URI is from your website or not. Not strictly necessary, 10 | as users should be using relative URIs to reference resources on your 11 | website. It will, however, let you use absolute URIs to link to 12 | subdomains of the domain you post here: i.e. example.com will allow 13 | sub.example.com. However, higher up domains will still be excluded: 14 | if you set %URI.Host to sub.example.com, example.com will be blocked. 15 | Note: This directive overrides %URI.Base because 16 | a given page may be on a sub-domain, but you wish HTML Purifier to be 17 | more relaxed and allow some of the parent domains too. 18 |

19 | --# vim: et sw=4 sts=4 20 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt: -------------------------------------------------------------------------------- 1 | URI.HostBlacklist 2 | TYPE: list 3 | VERSION: 1.3.0 4 | DEFAULT: array() 5 | --DESCRIPTION-- 6 | List of strings that are forbidden in the host of any URI. Use it to kill 7 | domain names of spam, etc. Note that it will catch anything in the domain, 8 | so moo.com will catch moo.com.example.com. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt: -------------------------------------------------------------------------------- 1 | URI.MakeAbsolute 2 | TYPE: bool 3 | VERSION: 2.1.0 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 | 7 |

8 | Converts all URIs into absolute forms. This is useful when the HTML 9 | being filtered assumes a specific base path, but will actually be 10 | viewed in a different context (and setting an alternate base URI is 11 | not possible). %URI.Base must be set for this directive to work. 12 |

13 | --# vim: et sw=4 sts=4 14 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt: -------------------------------------------------------------------------------- 1 | URI.MungeResources 2 | TYPE: bool 3 | VERSION: 3.1.1 4 | DEFAULT: false 5 | --DESCRIPTION-- 6 |

7 | If true, any URI munging directives like %URI.Munge 8 | will also apply to embedded resources, such as <img src="">. 9 | Be careful enabling this directive if you have a redirector script 10 | that does not use the Location HTTP header; all of your images 11 | and other embedded resources will break. 12 |

13 |

14 | Warning: It is strongly advised you use this in conjunction 15 | %URI.MungeSecretKey to mitigate the security risk of an open redirector. 16 |

17 | --# vim: et sw=4 sts=4 18 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt: -------------------------------------------------------------------------------- 1 | URI.MungeSecretKey 2 | TYPE: string/null 3 | VERSION: 3.1.1 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 |

7 | This directive enables secure checksum generation along with %URI.Munge. 8 | It should be set to a secure key that is not shared with anyone else. 9 | The checksum can be placed in the URI using %t. Use of this checksum 10 | affords an additional level of protection by allowing a redirector 11 | to check if a URI has passed through HTML Purifier with this line: 12 |

13 | 14 |
$checksum === hash_hmac("sha256", $url, $secret_key)
15 | 16 |

17 | If the output is TRUE, the redirector script should accept the URI. 18 |

19 | 20 |

21 | Please note that it would still be possible for an attacker to procure 22 | secure hashes en-mass by abusing your website's Preview feature or the 23 | like, but this service affords an additional level of protection 24 | that should be combined with website blacklisting. 25 |

26 | 27 |

28 | Remember this has no effect if %URI.Munge is not on. 29 |

30 | --# vim: et sw=4 sts=4 31 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt: -------------------------------------------------------------------------------- 1 | URI.OverrideAllowedSchemes 2 | TYPE: bool 3 | DEFAULT: true 4 | --DESCRIPTION-- 5 | If this is set to true (which it is by default), you can override 6 | %URI.AllowedSchemes by simply registering a HTMLPurifier_URIScheme to the 7 | registry. If false, you will also have to update that directive in order 8 | to add more schemes. 9 | --# vim: et sw=4 sts=4 10 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt: -------------------------------------------------------------------------------- 1 | URI.SafeIframeRegexp 2 | TYPE: string/null 3 | VERSION: 4.4.0 4 | DEFAULT: NULL 5 | --DESCRIPTION-- 6 |

7 | A PCRE regular expression that will be matched against an iframe URI. This is 8 | a relatively inflexible scheme, but works well enough for the most common 9 | use-case of iframes: embedded video. This directive only has an effect if 10 | %HTML.SafeIframe is enabled. Here are some example values: 11 |

12 | 17 |

18 | Note that this directive does not give you enough granularity to, say, disable 19 | all autoplay videos. Pipe up on the HTML Purifier forums if this 20 | is a capability you want. 21 |

22 | --# vim: et sw=4 sts=4 23 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/ConfigSchema/schema/info.ini: -------------------------------------------------------------------------------- 1 | name = "HTML Purifier" 2 | 3 | ; vim: et sw=4 sts=4 4 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/Language/classes/en-x-test.php: -------------------------------------------------------------------------------- 1 | 'HTML Purifier X' 9 | ); 10 | 11 | // vim: et sw=4 sts=4 12 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/Language/messages/en-x-testmini.php: -------------------------------------------------------------------------------- 1 | 'HTML Purifier XNone' 10 | ); 11 | 12 | // vim: et sw=4 sts=4 13 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/Printer/ConfigForm.css: -------------------------------------------------------------------------------- 1 | 2 | .hp-config {} 3 | 4 | .hp-config tbody th {text-align:right; padding-right:0.5em;} 5 | .hp-config thead, .hp-config .namespace {background:#3C578C; color:#FFF;} 6 | .hp-config .namespace th {text-align:center;} 7 | .hp-config .verbose {display:none;} 8 | .hp-config .controls {text-align:center;} 9 | 10 | /* vim: et sw=4 sts=4 */ 11 | -------------------------------------------------------------------------------- /webui/system/helper/standalone/HTMLPurifier/Printer/ConfigForm.js: -------------------------------------------------------------------------------- 1 | function toggleWriteability(id_of_patient, checked) { 2 | document.getElementById(id_of_patient).disabled = checked; 3 | } 4 | 5 | // vim: et sw=4 sts=4 6 | -------------------------------------------------------------------------------- /webui/system/ldap.php: -------------------------------------------------------------------------------- 1 | driver = new $driver($ldaphost, $ldapport, $binddn, $bindpw); 14 | } 15 | 16 | 17 | public function ldap_query($basedn, $filter, $justthese) { 18 | return $this->driver->query($basedn, $filter, $justthese); 19 | } 20 | 21 | 22 | public function ldap_add($dn, $entry) { 23 | return @$this->driver->add($dn, $entry); 24 | } 25 | 26 | 27 | public function ldap_modify($dn, $entry) { 28 | return @$this->driver->modify($dn, $entry); 29 | } 30 | 31 | 32 | public function ldap_rename($dn, $newrdn, $newparent) { 33 | return @$this->driver->rename($dn, $newrdn, $newparent); 34 | } 35 | 36 | 37 | public function ldap_replace($dn, $entry) { 38 | return @$this->driver->replace($dn, $entry); 39 | } 40 | 41 | 42 | public function ldap_delete($dn) { 43 | return @$this->driver->delete($dn); 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /webui/system/model.php: -------------------------------------------------------------------------------- 1 | get = $_GET; 14 | $this->post = $_POST; 15 | $this->cookie = $_COOKIE; 16 | $this->files = $_FILES; 17 | $this->server = $_SERVER; 18 | 19 | if(isset($_SERVER['REQUEST_URI'])) { 20 | $this->fixed_request_uri = preg_replace("/\/([\w]+)\.php\?{0,1}/", "", $_SERVER['REQUEST_URI']); 21 | } 22 | } 23 | 24 | } 25 | 26 | 27 | class Session { 28 | 29 | public function __construct() { 30 | session_start(); 31 | } 32 | 33 | 34 | public function get($k = '') { 35 | if($k && isset($_SESSION[$k])) { return $_SESSION[$k]; } 36 | 37 | return ''; 38 | } 39 | 40 | 41 | public function set($k = '', $v = '') { 42 | 43 | if($k) { $_SESSION[$k] = $v; } 44 | 45 | } 46 | 47 | 48 | public function remove($k = '') { 49 | if($k) { unset($_SESSION[$k]); } 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /webui/system/router.php: -------------------------------------------------------------------------------- 1 | sanitize_path($route); 17 | 18 | $file = DIR_APPLICATION . $path . '.php'; 19 | 20 | if(is_file($file)){ 21 | $this->class = $path; 22 | } 23 | 24 | if($args){ 25 | $this->args = $args; 26 | } 27 | 28 | $this->method = 'index'; 29 | } 30 | 31 | 32 | public function getClass(){ 33 | return $this->class; 34 | } 35 | 36 | 37 | public function getMethod(){ 38 | return $this->method; 39 | } 40 | 41 | 42 | public function getArgs(){ 43 | return $this->args; 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /webui/system/startup.php: -------------------------------------------------------------------------------- 1 | 3 | '.$text_accounting_email.''; } else { echo ''.$text_accounting_email.''; } ?> | 4 | '.$text_accounting_domain.''; } else { echo ''.$text_accounting_domain.''; } ?> 5 |

6 | 7 |

8 | 9 | 0) { ?> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
(@)
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |

31 | -------------------------------------------------------------------------------- /webui/templates/audit/audit.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/templates/audit/audit.tpl -------------------------------------------------------------------------------- /webui/templates/audit/remove.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 |
.
4 |

 

5 | 6 |
7 | -------------------------------------------------------------------------------- /webui/templates/common/common.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 12 |
13 | 14 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /webui/templates/common/error.tpl: -------------------------------------------------------------------------------- 1 | 2 |

3 | -------------------------------------------------------------------------------- /webui/templates/common/footer.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/templates/common/footer.tpl -------------------------------------------------------------------------------- /webui/templates/common/layout-empty.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webui/templates/common/not_found.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/templates/common/not_found.tpl -------------------------------------------------------------------------------- /webui/templates/customer/remove.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
.
7 | 8 | 9 | 10 |

 

11 | 12 |
13 | -------------------------------------------------------------------------------- /webui/templates/domain/remove.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
.
6 |

 

7 | 8 | 9 | 10 |

  |  :

11 | 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /webui/templates/health/health.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /webui/templates/import/remove.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
.
7 | 8 | 9 | 10 |

 

11 | 12 |
13 | -------------------------------------------------------------------------------- /webui/templates/ldap/remove.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
.
7 | 8 | 9 | 10 |

 

11 | 12 |
13 | -------------------------------------------------------------------------------- /webui/templates/login/logout.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <?php if($title_prefix) { print $title_prefix; ?> | <?php } ?><?php print $title; ?> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |

22 |

.

23 |
24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /webui/templates/message/bulkremove.tpl: -------------------------------------------------------------------------------- 1 |

:

2 | -------------------------------------------------------------------------------- /webui/templates/message/bulkrestore.tpl: -------------------------------------------------------------------------------- 1 |

:

2 | -------------------------------------------------------------------------------- /webui/templates/message/journal.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

6 | 7 |   | 8 | 9 | 10 |   | 11 | 12 |   | 13 | 14 |   15 |   16 | 17 |

18 | 19 |
20 | 21 |
22 | -------------------------------------------------------------------------------- /webui/templates/message/restore.tpl: -------------------------------------------------------------------------------- 1 |
2 |

3 |   | 4 |   | 5 |   6 |

7 |
8 | 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /webui/templates/policy/apply.tpl: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /webui/templates/policy/updateretention.tpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | :
5 | :
6 | : 7 | 8 |
9 | -------------------------------------------------------------------------------- /webui/templates/search/load.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 0){ ?> 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Query Name 
|  
19 | 20 | 21 |
No saved queries yet
22 | 23 | 24 |
25 |
26 | -------------------------------------------------------------------------------- /webui/templates/search/search.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/templates/search/search.tpl -------------------------------------------------------------------------------- /webui/templates/search/tag.tpl: -------------------------------------------------------------------------------- 1 |

2 | -------------------------------------------------------------------------------- /webui/templates/stat/online.tpl: -------------------------------------------------------------------------------- 1 | 2 |

, : sec

3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 |
30 | -------------------------------------------------------------------------------- /webui/templates/user/remove.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
.
6 |

 

7 | 8 | 9 | 10 |

  |  :

11 | 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /webui/tmp/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsuto/piler/0b9881448a2bf1ef44b61498b04d8f240ba59392/webui/tmp/index.html --------------------------------------------------------------------------------