Skip to content

Instantly share code, notes, and snippets.

View jasonmunro's full-sized avatar
💭
Working on a new release!

Jason Munro jasonmunro

💭
Working on a new release!
View GitHub Profile
diff --git a/modules/smtp/modules.php b/modules/smtp/modules.php
index e1d568c4..9c4b1bb4 100644
--- a/modules/smtp/modules.php
+++ b/modules/smtp/modules.php
@@ -413,6 +413,7 @@ class Hm_Handler_smtp_save extends Hm_Handler_Module {
else {
Hm_Msgs::add("ERRUnable to save this server, are the username and password correct?");
Hm_SMTP_List::forget_credentials($form['smtp_server_id']);
+ elog($smtp->puke());
}
diff --git a/modules/gmail_contacts/modules.php b/modules/gmail_contacts/modules.php
index a1ce5899..e9334376 100644
--- a/modules/gmail_contacts/modules.php
+++ b/modules/gmail_contacts/modules.php
@@ -39,6 +39,7 @@ function gmail_contacts_request($token, $url) {
*/
if (!hm_exists('parse_contact_xml')) {
function parse_contact_xml($xml, $source) {
+ elog($xml);
$parser = new Hm_Gmail_Contact_XML($xml);
diff --git a/lib/dispatch.php b/lib/dispatch.php
index 6f693579..f4079bef 100644
--- a/lib/dispatch.php
+++ b/lib/dispatch.php
@@ -94,6 +94,11 @@ trait Hm_Dispatch_Redirect {
if ($this->post_redirect($request, $session, $mod_exec)) {
return 'redirect';
}
+ elseif (array_key_exists('redirect_url', $mod_exec->handler_response) &&
+ $mod_exec->handler_response['redirect_url']) {
@jasonmunro
jasonmunro / redirect.diff
Created June 14, 2021 19:55
redirect.diff
diff --git a/lib/dispatch.php b/lib/dispatch.php
index 6f693579..4934c5bc 100644
--- a/lib/dispatch.php
+++ b/lib/dispatch.php
@@ -94,6 +94,12 @@ trait Hm_Dispatch_Redirect {
if ($this->post_redirect($request, $session, $mod_exec)) {
return 'redirect';
}
+ if (array_key_exists('redirect_url', $mod_exec->handler_response) &&
+ $mod_exec->handler_response['redirect_url']) {
@jasonmunro
jasonmunro / changes.txt
Created June 8, 2021 19:17
Cypht changes since 1.1.0
4fec6547 make sure we always indicate a failed login issue #487 (2021-06-08) <Jason Munro>
6342fd00 fix highlight rules that include both E-mail types and sources (2021-06-08) <Jason Munro>
5a747b55 fix typo in imap specific highlight rules (2021-06-08) <Jason Munro>
2b3e9be3 force color display in highlight rules list (2021-06-08) <Jason Munro>
265919ca highlight fix for background color + themes (2021-06-08) <Jason Munro>
d830f006 too dark theme tweak (2021-06-08) <Jason Munro>
30d787c6 fix unit test I just broke (2021-06-07) <Jason Munro>
db8fb96a fix cursor to indicate a button on the login page, issue #486 (2021-06-07) <Jason Munro>
85b082b4 add missing rule type arg
jason [ ~/cypht ]$ git diff modules/
diff --git a/modules/smtp/modules.php b/modules/smtp/modules.php
index 3713882f..033dd479 100644
--- a/modules/smtp/modules.php
+++ b/modules/smtp/modules.php
@@ -471,6 +471,7 @@ class Hm_Handler_smtp_connect extends Hm_Handler_Module {
*/
class Hm_Handler_process_compose_form_submit extends Hm_Handler_Module {
public function process() {
+ error_log(print_r($this->request->post, true));
@jasonmunro
jasonmunro / default_page.diff
Created July 14, 2020 03:35
Use the default page after login setting when no page is specified in the url
diff --git a/modules/core/handler_modules.php b/modules/core/handler_modules.php
index 2c8b2357..5a5d3de3 100644
--- a/modules/core/handler_modules.php
+++ b/modules/core/handler_modules.php
@@ -647,6 +647,12 @@ class Hm_Handler_load_user_data extends Hm_Handler_Module {
}
$this->out('mailto_handler', $this->user_config->get('mailto_handler_setting', false));
$this->out('no_password_save', $this->user_config->get('no_password_save_setting', false));
+ if (!strstr($this->request->server['REQUEST_URI'], 'page=') && $this->page == 'home') {
+ $start_page = $this->user_config->get('start_page_setting', false);
diff --git a/lib/request.php b/lib/request.php
index 94a32b5b..362b9ac1 100644
--- a/lib/request.php
+++ b/lib/request.php
@@ -112,6 +112,7 @@ class Hm_Request {
* @return void
*/
private function get_other_request_details() {
+ elog($this->server);
$this->sapi = php_sapi_name();
@jasonmunro
jasonmunro / method.diff
Created June 10, 2020 17:10
method check
diff --git a/lib/module.php b/lib/module.php
index 6edebe76..76a5dbbf 100644
--- a/lib/module.php
+++ b/lib/module.php
@@ -195,6 +195,7 @@ trait Hm_Handler_Validate {
* @return bool
*/
public function validate_method($session, $request) {
+ elog($request->method);
if (!in_array(strtolower($request->method), array('get', 'post'), true)) {
diff --git a/modules/ldap_contacts/hm-ldap-contacts.php b/modules/ldap_contacts/hm-ldap-contacts.php
index 4ff063105..d88917239 100644
--- a/modules/ldap_contacts/hm-ldap-contacts.php
+++ b/modules/ldap_contacts/hm-ldap-contacts.php
@@ -43,7 +43,8 @@ class Hm_LDAP_Contacts extends Hm_Auth_LDAP {
array_key_exists('user', $this->config) && $this->config['user'] &&
array_key_exists('pass', $this->config) && $this->config['pass']) {
- return @ldap_bind($this->fh, $this->config['user'], $this->config['pass']);
+ elog($this->config);