Monday, 2010-06-21

../irclogs/#mantishelp.2010-06-21.log
--- scribe started ---00:00
dhx_mI'm now up to testing my new bug_update.php07:23
dhx_mwill try and push it to MantisForge later for more testing07:23
dhx_mit fixes millions and billions of bugs :)07:23
dhx_mand probably introduces a couple of new ones I imagine07:23
nuclear_eclipseDraggor: there/12:51
dhx_mno but I am :)13:04
nuclear_eclipsehi dhx_m13:32
Draggornuclear_eclipse: heyo15:44
slestakis there a cron I can add to update my repos in sourcecontrol plugin?16:28
slestakmaybe an Import Latest Data every 60 minutes?16:28
nuclear_eclipseslestak: yep16:37
nuclear_eclipse`curl http://domain/mantis//plugin.php?page=Source/repo_import_latest.php` sort of thing16:38
nuclear_eclipserequires enabling "Remote Imports" from your source integration configuration page16:38
nuclear_eclipseand adding the server's IP to the whitelist16:39
nuclear_eclipseDraggor: re URL sniffing16:39
Draggornuclear_eclipse: What's up?16:39
nuclear_eclipseI'm all ears if you have a better idea of how it should work, but afaik, if you're setting up a reverse proxy system, you shouldn't need to be rewriting urls behind the proxy -- that just seems like it's a) asking for trouble, and b) has no proper solution for the application16:41
nuclear_eclipseie, how can the application possibly know what URL is being used from in front of the reverse proxy?16:41
DraggorWell, I set the $g_path and that's exactly what I want it to use16:42
nuclear_eclipsealso, if you really do have something really complex, you should be able to just set $g_path, $g_short_path, etc in your config_inc.php, and everything should just work16:42
DraggorThat's not entirely true16:42
Draggorunless I'm misconfiguring things16:42
nuclear_eclipseif you're setting $g_path in your config_inc.php, then I don't know how it can't be working right, because all of the URL sniffing takes ploce before config_your inc.php overrides those values16:43
DraggorWhat I keep seeing, for instance, when as an admin I go to delete another user16:44
DraggorWhen it gets to the confirm page, the action of the form is different from everything else I see16:44
nuclear_eclipseare you setting $g_short_path?16:45
DraggorSo my g_path is www.dracolair.net/tracker/ and my short path is /tracker/.  My mod rewrite transforms the request to dracolair.net/www/tracker/.  The action on the form comes out as /www/tracker/manage_user_delete.php instead of just manage_user_delete.php16:45
nuclear_eclipseoh, that sounds like your reverse proxy is doing something that it shouldn't be16:47
nuclear_eclipsefor manage_user_delete.php, mantis never does anything but output just the page name16:47
DraggorSo far I've had no issues with forum software, wikis, custom apps, etc, mantisbt is the first one I've had trouble with.  The function is one of the helpers, let me look it up16:48
DraggorI mean SCRIPT_NAME will pull everything after the domain16:48
nuclear_eclipseright, but if you're overridding $g_path/$g_short_path, the SCRIPTNAME stuff is just ignored/overwritten16:49
nuclear_eclipseand like I said: for manage_user_delete.php, mantis never does anything but output just the16:49
nuclear_eclipse      page name16:49
nuclear_eclipseit doesn't use a short or full path for that, so if you don't see `action="manage_user_delete.php"` in your form, then it more or less has to be something the reverse proxy is munging16:50
DraggorSo, where in the code is it modifying $_SERVER['SCRIPT_NAME']?16:51
nuclear_eclipseit's not modifying it16:51
DraggorI'm afraid I don't quite follow how in this case my path and short path are being used then16:52
nuclear_eclipsein config_defaults_inc.php, the code reads that value to guess at what $g_path should be16:52
nuclear_eclipsewell, in the case of that form, neither is being used at all16:52
nuclear_eclipsewhich is why I say that it must be your revzerse proxy munging that form target16:53
DraggorIt's in the  helper_ensure_confirmed function that I tried making a change and it appeared to work16:53
nuclear_eclipseoh, I see16:54
nuclear_eclipseit's when you're trying to submit the confirmation that it's breaking?16:54
DraggorYes16:54
nuclear_eclipsegotcha16:54
nuclear_eclipsethat's the disconnect we were missing16:55
Draggoras the action of that form is /www/tracker/manage_user_delete.php16:55
DraggorYeah, sorry16:55
nuclear_eclipsenp16:55
nuclear_eclipselet me stew on that16:55
DraggorA similar problem shows up where if you're logged in for a long while and you go to do an admin action, it requests that you re-verify your password16:55
nuclear_eclipseyeah, they both do a very similar action16:56
DraggorEverything else works fine as far as i can tell16:56
nuclear_eclipsein both of those cases, it most likely makes sense to just drop everything up to and including the last "/" from SCRIPT_PATH16:57
nuclear_eclipseSCRIPT_NAME rather16:57
nuclear_eclipseI can't think of any possible situation where a form action relative to itself wouldn't work16:58
DraggorI ended up doing this:16:58
Draggor$modpath = explode("/", $_SERVER['PHP_SELF']);16:58
Draggorecho '<form method="post" action="' . $modpath[count($modpath)-1] . "\">\n";16:58
DraggorGranted, I'm not a php guy, heh16:58
nuclear_eclipseyeah, that's a simple method of what I was thinking16:59
nuclear_eclipsearray_pop() is better in this case than $foo[count($foo)-1]16:59
DraggorAh, cool17:00
nuclear_eclipseactually, even better overall would be basename($_SERVER[SCRIPT_NAME])17:00
Draggorlemme try it17:01
nuclear_eclipseor basename($_SERVER[PHP_SELF])17:02
DraggorYep works fine17:03
DraggorNow to just find those other instances17:05
darynnuclear_eclipse, any look at filters yet? :)17:05
nuclear_eclipseafaik, it should just be helper_ensure_confirmed and auth_reauthenticate17:06
DraggorI believe line 677 in authentication_api.php17:06
Draggoryeah17:06
nuclear_eclipsehmm, `ack _SERVER` shows quite a ew other questionable uses...17:08
nuclear_eclipsehi daryn17:08
nuclear_eclipsenot yet17:08
DraggorYeah I saw that too17:11
Draggorwould a blanket replace of that work?17:20
nuclear_eclipseDraggor: I'm looking to replace them with a function that'll centralize that logic17:21
DraggorCool, cool17:24
nuclear_eclipseDraggor: do you have abug opened on mantisbt.org?17:26
nuclear_eclipsehi paulr_17:35
* paulr_ sighs17:36
paulr_i mean, hi17:36
paulr_;(17:36
kirillkapaulr_: hi17:56
kirillkapaulr_: mantisforge not sync with mantisbt again?17:57
slestaknuclear_eclipse: did the curl thing.  got al error that a parm is missing.  tried appending &id=4 to teh end as well to choose a particular repo17:59
slestakgoing into a meeting, bbl17:59
nuclear_eclipseDraggor: can you test and verify that these two patches fix the issue for you?18:11
nuclear_eclipseDraggor: http://mantis.pastebin.com/SNi0kH61 and http://mantis.pastebin.com/y9k3FsCS18:11
Draggornuclear_eclipse: So I'm new at this stuff, how do I actually apply those patches?18:18
Draggorpatch -p0 < patch_file in the main mantisbt dir?18:22
nuclear_eclipseDraggor: if you're using git, you can do `git am filename`, otherwise use `patch -p1 < filename`18:26
paulr_nuclear_eclipse: php_Self is broken in some builds of php btw18:35
paulr_I vaguely recall us adding a function at one point to return current filename without using that18:36
paulr_i.e. iirc, that was why we used $_SERVER['SCRIPT_NAME']18:36
nuclear_eclipsewell, considering that we require PHP 5.1+, I'm pretty sure there aren't any broken PHP_SELF anymore18:37
nuclear_eclipsebesides, SCRIPT_NAME breaks quite badly if your server is doing any sort of URL rewriting18:40
DraggorI proved that one!18:43
nuclear_eclipseDraggor: your issue is somewhat unrelated to that though :P18:44
DraggorShhh!18:45
nuclear_eclipseif your apache rewrites /foo/* to /bar/*, SCRIPT_NAME shows /bar/*, but PHP_SELF and REQUEST_URI show /foo/*18:45
nuclear_eclipsewell, assuming your rewrite doesn't generate a 302 header18:46
nuclear_eclipseDraggor: any result on testing those patches?18:50
paulr_nuclear_eclipse: it was in a 5.1 or 5.2 release it was broken :P18:50
nuclear_eclipsepaulr_: meh18:52
nuclear_eclipseseriously though, SCRIPT_NAME is not something to use for URL detection18:52
paulr_yea18:52
nuclear_eclipseREQUEST_URI would be better than SCRIPT_NAME18:52
paulr_it's fixed now18:53
paulr_but was reported as broken in 5.2.418:53
nuclear_eclipseI'd imagine not many people are running 5.2.4 anymore, and ever if they are, it's their fault if mantis breaks because they're 8 minor versions behind18:53
paulr_Version 5.3.018:54
paulr_30-June-200918:54
paulr_I mean18:54
paulr_5.3 was june 200918:54
nuclear_eclipsesorry, 9 minor versions bihend...18:54
paulr_:)18:54
paulr_again the problem is distributions18:55
paulr_:)18:55
paulr_i mean, on windows, you either a) install from php.net b) install from MS's web installer18:55
nuclear_eclipseI can't imagine any proper distro wouldn't have a security/bugfix for that in place by now18:55
paulr_and i'm pretty sure both are fairly current :P18:55
nuclear_eclipseand once again, it's their fault if mantis breaks because they're 8 minor versions behind18:55
paulr_I think we should commit to support php versions <2 years old18:56
paulr_and at that point, bb18:56
nuclear_eclipseour webapp shouldn't be tiptoeing around bugs in PHP that have been fixed for years18:56
paulr_i.e. we test/support php up to 1 year old18:56
paulr_once stuff drops off18:56
paulr_we'll support mantis18:56
paulr_but may ask users to run a newer php18:56
paulr_if we can't repro18:56
nuclear_eclipseit's one thing if it's a feature of PHP that we have to work around, eg, changes to PHP functions, but it's completely different if it's a bug that's only found in one older revision18:57
mantisbt_47401hi there19:25
mantisbt_47401anybody has experience with Mantis email services?19:25
moto-moimantisbt_47401: what do you mean by that?19:29
mantisbt_47401I have some issues with sending emails with mantis19:30
mantisbt_47401can you tell me what is cronjob?19:30
moto-moiit normaly doesn't use a cronjob to send emails, just an inline mail()-command19:39
mantisbt_47401oh ok19:40
mantisbt_47401in other words there is no use to use this in the config_inc.php19:40
mantisbt_47401?19:40
moto-moiwell, there isn't one mailsetup, so to enable people with other kinds of mailsetups, eg an external mailmachine which wants a login, you can change the emailsettings in the configfile19:41
mantisbt_47401ok19:44
mantisbt_47401another question19:44
mantisbt_47401whenever somebody creates a new issue I'd like to have certain people get notified (lets say mail list #1)19:45
mantisbt_47401besides this it would be great if the user could notifiy other people not on the list#1 as well19:46
mantisbt_47401is there an easy way to do this?19:46
moto-moiafaik not19:51
moto-moithe user doesn't deside which developer gets a notification19:51
slestaknuclear_eclipse: i tried curl http://mantis.commercecorp.com/plugin.php?page=Source/repo_import_latest.php&id=4 but the page returned says it is missing (id).  Specifically "A required parameter to this page (id) was not found."19:54
slestaki pasted wrong one19:54
slestakI didnt use ampersand, I replaced with ?19:55
mantisbt_47401ok. Can I fix somehow at least who should be on the list#1? (this requires no user interaction, and should be defined once)19:59
slestakwhere in the url is the id arg expected?19:59
slestakhrm, i see it is an ampersand, let me try a regular escape20:02
slestaki got it working with a regular escape .i.e. \&id=420:05
Draggornuclear_eclipse: I return, so far so good on the patches20:20
nuclear_eclipseDraggor: thanks20:48
CIA-24Mantisbt: jreese * r532b0501149d / (7 files in 2 dirs): Migrate from existing usages to form_action_self()20:49
CIA-24Mantisbt: jreese * r00e60da3b589 /config_defaults_inc.php: Fix #12092: Detect SOAP API in url sniffing20:49
CIA-24Mantisbt: jreese master-1.2.x * rc98310c19023 / (7 files in 2 dirs): Migrate from existing usages to form_action_self()20:49
CIA-24Mantisbt: jreese master-1.2.x * r193f3be7bb79 /core/form_api.php: Added form_action_self() API function20:49
CIA-24Mantisbt: jreese * r9d357c23fc62 /core/form_api.php: Added form_action_self() API function20:49
CIA-24Mantisbt: jreese master-1.2.x * rcf7f557fbc48 /config_defaults_inc.php: Fix #12092: Detect SOAP API in url sniffing20:49
paulr_<CIA-24> Mantisbt: jreese master-1.2.x * rcf7f557fbc48 /config_defaults_inc.php: Fix #12092: Detect SOAP API in url sniffing21:00
paulr_dare I want to look at what that changes21:00
Draggorfor integrating mantisbt and dokuwiki, do I just have to install theplugin in dokuwiki or do I need more than that?21:25
kirillkaDraggor: For now this plugin not work, imho21:28
kirillkapaulr_: can you fix sync 2 project?21:38
dhx_mboop22:07
darynhi dhx_m22:10
dhx_mdaryn: hi :)22:11
daryni'm bugging people about looking at filters branch :)22:11
dhx_mthe latest is on mforge?22:19
darynwell the latest until two minutes ago22:20
daryni have a small bug fix to push22:20
dhx_mok22:22
daryndhx_mjust pushed it22:26
dhx_mthanks22:28
dhx_mwill try and check it soon... just upgrading Postgres at the moment22:28
daryncool, thx22:29
paulr_dhx_m: moo22:52
dhx_mpaulr_: hi :)22:52
paulr_we need to talk22:52
paulr_can we arrange a date? :)22:53
dhx_mmore a time zone :)22:53
paulr_yea so erm22:55
paulr_your exams are done?22:55
dhx_myep22:56
dhx_mhave a bunch of significant changes to push soon (after I finish testing)22:56

Generated by irclog2html.py