how to change "weave-password-reset" URL in GET/POST and action declarations

2 views
Skip to first unread message

André Weidemann

unread,
Feb 29, 2012, 12:58:45 AM2/29/12
to servic...@mozilla.org
Hi,
I have set up a Weave-Server from yesterdays hg-clone under the
following address, since I do not have the luxury of a second IP address
for a second virtual host.

https://<servername>/ff-sync/


The apache2 config looks like this:

Alias /media /usr/local/share/weave-sever/deps/server-reg/syncreg/static
WSGIProcessGroup sync
WSGIDaemonProcess sync user=sync group=nogroup processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias /ff-sync /usr/local/share/weave-sever/sync.wsgi


The [auth] and [nodes] section in my sync.conf look like this:

[auth]
backend = services.user.sql.SQLUser
sqluri = sqlite:////var/cache/weave/weave_user
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = https://<servername>/ff-sync/

[nodes]
fallback_node = https://<servername>/ff-sync/

Syncing my Firefox instances works like a charm. The only thing that
does not work is requesting a reset key in case I lost the key to my store.

After opening https://<servername>/ff-sync/weave-password-reset I enter
the eMail-address into the input field and hit "Request Reset Key".
Unfortunately this does not work. Upon hitting the button, the browser
opens the URL https://<servername>/weave-password-reset (note: "ff-sync"
is gone in the URL) which does not exist.

So I edited the source code and preceded all occurrences of
"weave-password-reset" with "ff-sync/" and even committed them to the hg
repo. However, after doing another "make build" my changes get
over-written again.

How can I change the URL for the POST requests?

Kind Regards
André
_______________________________________________
Services-dev mailing list
Servic...@mozilla.org
https://mail.mozilla.org/listinfo/services-dev

Fabian Wenk

unread,
Feb 29, 2012, 8:54:13 AM2/29/12
to servic...@mozilla.org
Hello André

On 29.02.2012 06:58, André Weidemann wrote:
> I have set up a Weave-Server from yesterdays hg-clone under the
> following address, since I do not have the luxury of a second IP address
> for a second virtual host.

If you are using the same domain name, and have a certificate
with wildcard (eg. *.example.com) or with Subject Alternative
Names (SAN, eg. a.example.com and b.example.com) then you can use
virtual hosting even with SSL. Alternatively, depending on the
clients visiting your https websites, you could use SNI [1]. It
does not work with any version of IE on Windows XP, see [2].

[1] http://en.wikipedia.org/wiki/Server_Name_Indication
[2] http://en.wikipedia.org/wiki/Server_Name_Indication#No_support

> The [auth] and [nodes] section in my sync.conf look like this:
>
> [auth]
> backend = services.user.sql.SQLUser
> sqluri = sqlite:////var/cache/weave/weave_user
> pool_size = 100
> pool_recycle = 3600
> create_tables = true
> fallback_node = https://<servername>/ff-sync/

You can (or should?) remove the fallback_node from [auth] (or any
other section, except in [node]).

> Syncing my Firefox instances works like a charm. The only thing that
> does not work is requesting a reset key in case I lost the key to my store.

You will not be able to reset your "Recovery Key", you can only
reset the user password. If you are using sync from only one
computer, you really need to note down the "Recovery Key"
somewhere else. In the Preferences go to Sync and select "My
Recovery Key" from the "Manage Account" pull-down. If you do not
have it any more, you will not be able to access your synced
Bookmkarks again.

> After opening https://<servername>/ff-sync/weave-password-reset I enter
> the eMail-address into the input field and hit "Request Reset Key".
> Unfortunately this does not work. Upon hitting the button, the browser
> opens the URL https://<servername>/weave-password-reset (note: "ff-sync"
> is gone in the URL) which does not exist.

Try to add the following line to your Apache configuration as a
work around (on a single line):

Redirect permanent /weave-password-reset
https://<servername>/ff-sync/weave-password-reset

If you then see other errors, you probably need also to adjust
permissions for
'/path/to/server-full/deps/server-reg/syncreg/templates'. See
also my "Mozilla Custom Sync Server Installation on FreeBSD" [3]
guide at the end of the "Sync Server Configuration" section.

[3] http://www.wenks.ch/fabian/mozilla-custom-sync-server/

> So I edited the source code and preceded all occurrences of
> "weave-password-reset" with "ff-sync/" and even committed them to the hg
> repo. However, after doing another "make build" my changes get
> over-written again.

The 'make build' does build the 'prod' channel, eg. it will sync
the source of all components to the last production release and
overwrite your changes.

> How can I change the URL for the POST requests?

I guess it would be a good idea, if a Mozilla developer does fix
this the right way, so that it will also work with the configured
URL in fallback_node and not use a hard coded path there. Please
file a bug report at [4] with the details where the wrong path is.

[4] https://bugzilla.mozilla.org/


bye
Fabian

Reply all
Reply to author
Forward
0 new messages