List of commits:
Subject Hash Author Date (UTC)
totp: remove expired entries 06cd360eff667740bcf8a580447cb86f3c2e6850 Catalin(ux) M. BOIE 2018-05-29 17:38:16
Show disk size in users list 9cc05cb0307cf31d6d2ebacda0846b0774e704d7 Catalin(ux) M. BOIE 2017-12-25 08:09:22
Added timeout for ldap bind/search operations 502fbf1287f1ad37f7c6c82c473c9b472d3fa65a Catalin(ux) M. BOIE 2017-11-26 15:46:51
Default uid_attr for ldap is now 'uid' 6e3993359d506d76ec739dd87fa682eea6b5a3b6 Catalin(ux) M. BOIE 2017-11-26 14:57:58
lock cache must not store 'ok' field 5a600b275fcf50c2df2cb0253a80aa99ae145b0d Catalin(ux) M. BOIE 2017-11-26 14:41:33
CURLOPT_SSLCERT must not be provided in newer versions of curl d14ad10139a9a5f4f59961fbaa3fe371754e806a Catalin(ux) M. BOIE 2017-11-26 14:25:32
Newer git, by providing an empty user, will not sent the user. This is bad, switch to using 'guest' user 0c84bf03fa4ceb3fe4b832c39134116d8cea6105 Catalin(ux) M. BOIE 2017-11-26 14:23:11
Fixed edit_no_check's pass field usage ebd3ff1f73009bcf5943589e19ee8a573d80f6ac Catalin(ux) M. BOIE 2017-11-26 14:20:45
Small fix for typos in test runner a85032bd5854816c8df6e8d23a1817e462a6f31e Catalin(ux) M. BOIE 2017-11-26 13:47:18
We must set oversize_diff, even if also_patch is false c347c23a5ecc022a4354cfa27088fe3db5cddeea Catalin(ux) M. BOIE 2017-11-26 13:43:31
Added debug for rg_cache_merge function 740eb3b5dbd19ff8ab852ff745c4cad4b1b1a4fb Catalin(ux) M. BOIE 2017-11-26 13:42:38
Improved a little bit the way the tests are run c169ce030975bd0580d867a806df9c401a2b38e8 Catalin(ux) M. BOIE 2017-11-26 13:42:06
Latest git breaks anonymous push - fix it by using 'guest' user instead of the empty one b3d1265cc9b44786c0fd7aa2988c5614f62db978 Catalin(ux) M. BOIE 2017-11-26 12:39:43
Lots of changes, but mostly LDAP support 029d34fdc14587b9ef6eb9e87ac36f66caefdacf Catalin(ux) M. BOIE 2017-11-24 19:35:59
Fix state bug which triggered a not needed update of the structure f6118c456bfc960782a53b9dc090046d542f9db9 Catalin(ux) M. BOIE 2017-11-24 19:12:38
Some free_result and unlock only if successfully locked 64666ca1371c004f74376fce2e2a67ee9f608a34 Catalin(ux) M. BOIE 2017-10-01 06:10:47
If git_log_simple returns error, just return error acbbacda0947a3f8496c9b15870db574c08db715 Catalin(ux) M. BOIE 2017-08-31 03:43:25
Be less verbose in rg_rights_test 3cb2d12960b059b61f7c2c47c6198fbbdee8bccd Catalin(ux) M. BOIE 2017-08-10 04:19:34
Remove rg_log_buf stuff because of performance issues e85f70b38c197d44a9b4878dcff78da4f4f56562 Catalin(ux) M. BOIE 2017-08-08 20:08:56
Use a more efficient way to log multi line strings 67923e6760bf26923bd7ce9c9bced7a3f526cecf Catalin(ux) M. BOIE 2017-08-08 19:54:00
Commit 06cd360eff667740bcf8a580447cb86f3c2e6850 - totp: remove expired entries
Author: Catalin(ux) M. BOIE
Author date (UTC): 2018-05-29 17:38
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2018-05-29 17:38
Parent(s): 9cc05cb0307cf31d6d2ebacda0846b0774e704d7
Signer:
Signing key:
Signing status: N
Tree: 7844cfdefdda4c477e2a4d027e16159d7e9a7d40
File Lines added Lines deleted
inc/totp.inc.php 18 1
File inc/totp.inc.php changed (mode: 100644) (index 5842a17..07b7e5b)
... ... function rg_totp_del_ip($db, $uid, $ip)
551 551 return $ret; return $ret;
552 552 } }
553 553
554 /*
555 * Remove expired entries from a list of validations
556 */
557 function rg_totp_list_ip_clean($list)
558 {
559 $ret = array();
560 $now = time();
561 foreach ($list as $eip => $t) {
562 if ($t['expire'] < $now)
563 continue;
564
565 $ret[$eip] = $t;
566 }
567
568 return $ret;
569 }
570
554 571 /* /*
555 572 * Returns a list of login tokens IPs from database * Returns a list of login tokens IPs from database
556 573 */ */
 
... ... function rg_totp_list_ip($db, $uid)
564 581 . '::' . 'ip'; . '::' . 'ip';
565 582 $list = rg_cache_get($key); $list = rg_cache_get($key);
566 583 if ($list !== FALSE) { if ($list !== FALSE) {
567 $ret['list'] = $list;
584 $ret['list'] = rg_totp_list_ip_clean($list);
568 585 $ret['ok'] = 1; $ret['ok'] = 1;
569 586 break; break;
570 587 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main